diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-11-20 16:34:33 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-11-26 12:14:35 +0100 |
commit | 4321d7522e66f387351f6721a1380081ef2c78df (patch) | |
tree | 9ccbca649e871ad24584ed64b7aa5c42ebde3352 /apps/files/ajax | |
parent | 4ed0a418a0527e60c5a4dc4df059630fd4880adb (diff) | |
download | nextcloud-server-4321d7522e66f387351f6721a1380081ef2c78df.tar.gz nextcloud-server-4321d7522e66f387351f6721a1380081ef2c78df.zip |
Check if files are deletable before trying to delete them
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/delete.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 323b70706ce..4d4232e872e 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -27,7 +27,9 @@ $success = true; //Now delete foreach ($files as $file) { if (\OC\Files\Filesystem::file_exists($dir . '/' . $file) && - !\OC\Files\Filesystem::unlink($dir . '/' . $file)) { + !(\OC\Files\Filesystem::isDeletable($dir . '/' . $file) && + \OC\Files\Filesystem::unlink($dir . '/' . $file)) + ) { $filesWithError .= $file . "\n"; $success = false; } |