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

View file

@ -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;
}