summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/ajax/delete.php4
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;
}