no error if we try to delete a file which no longer exists

This commit is contained in:
Bjoern Schiessle 2014-08-08 16:16:01 +02:00
parent 5bbecdb9ee
commit 5b75b15292
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ $success = true;
//Now delete //Now delete
foreach ($files as $file) { 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"; $filesWithError .= $file . "\n";
$success = false; $success = false;
} }