diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-24 15:29:22 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-24 15:29:22 +0100 |
commit | dbb0d0407324830f4a7ff51781c535c1cb0d2a06 (patch) | |
tree | 4613244bc386b3e956063c00c543af88e5d16095 | |
parent | 6ab95e8e33e5dee48291bb3f95a86af0be8c3e70 (diff) | |
download | nextcloud-server-dbb0d0407324830f4a7ff51781c535c1cb0d2a06.tar.gz nextcloud-server-dbb0d0407324830f4a7ff51781c535c1cb0d2a06.zip |
restore file in the root folder if the origin folder is not writable
-rw-r--r-- | apps/files_trashbin/lib/trash.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index 0dad0590227..e81ba12758e 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -91,7 +91,9 @@ class Trashbin { // if location no longer exists, restore file in the root directory
$location = $result[0]['location'];
- if ( $result[0]['location'] != '/' && !$view->is_dir('files'.$result[0]['location']) ) {
+ if ( $result[0]['location'] != '/' && + (!$view->is_dir('files'.$result[0]['location']) || + !$view->is_writable('files'.$result[0]['location'])) ) {
$location = '';
} } else { |