restore file in the root folder if the origin folder is not writable

This commit is contained in:
Björn Schießle 2013-01-24 15:29:22 +01:00
parent 6ab95e8e33
commit dbb0d04073
1 changed files with 3 additions and 1 deletions

View File

@ -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 {