diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 196bccea0f..aed53d5db5 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -26,7 +26,8 @@ $success = true; //Now delete foreach ($files as $file) { - if (!\OC\Files\Filesystem::unlink($dir . '/' . $file)) { + if (\OC\Files\Filesystem::file_exists($dir . '/' . $file) && + !\OC\Files\Filesystem::unlink($dir . '/' . $file)) { $filesWithError .= $file . "\n"; $success = false; }