]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly delete empty directories in Trashbin
authorQingping Hou <dave2008713@gmail.com>
Sat, 16 Feb 2013 22:44:51 +0000 (17:44 -0500)
committerQingping Hou <dave2008713@gmail.com>
Sat, 16 Feb 2013 22:44:51 +0000 (17:44 -0500)
Instead of checking delted file size, we do a real check.

this fixes #1688

apps/files_trashbin/ajax/delete.php

index 7a6bd1342ea278ea53d29f66d17ef4f31cd42ecf..f41482bef5553a2f303f39fcb4b32b638deab337 100644 (file)
@@ -15,7 +15,9 @@ if ($path_parts['dirname'] == '.') {
        $timestamp = null;
 }
 
-if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) {
+OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp);
+
+if (!OCA\Files_Trashbin\Trashbin::file_exists($filename)) {
        OCP\JSON::success(array("data" => array("filename" => $file)));
 } else {
        $l = OC_L10N::get('files_trashbin');