Skip to content
Snippets Groups Projects
Commit 5b75b152 authored by Björn Schießle's avatar Björn Schießle
Browse files

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

parent 5bbecdb9
Branches
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment