From 4890a25d99f26bc0dfcaa09b7f64407debf88392 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 16 May 2009 07:42:27 +0000 Subject: [PATCH] "fixed not working delete of directories, if they contain hidden files (which get not displayed in the UI)" --- filemanager/inc/class.filemanager_ui.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 0a0dea8707..62d559a4c4 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -422,7 +422,10 @@ class filemanager_ui } if ($selected) // somethings left to delete { - foreach(egw_vfs::find($selected,array('depth'=>true)) as $path) + // now we use find to loop through all files and dirs: (selected only contains dirs now) + // - depth=true to get first the files and then the dir containing it + // - hidden=true to also return hidden files (eg. Thumbs.db), as we cant delete non-empty dirs + foreach(egw_vfs::find($selected,array('depth'=>true,'hidden'=>true)) as $path) { if (($is_dir = egw_vfs::is_dir($path) && !egw_vfs::is_link($path)) && egw_vfs::rmdir($path,0)) {