1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

Fixed #44 - appel récursif de remove_directory()

This commit is contained in:
nicosomb 2013-04-18 08:13:11 +02:00
parent d178419c66
commit 07a192525d

View File

@ -220,8 +220,7 @@ function remove_directory($directory)
if(is_dir($directory)) {
$files = array_diff(scandir($directory), array('.','..'));
foreach ($files as $file) {
// FIXME c'est quoi delTree ??
(is_dir("$directory/$file")) ? delTree("$directory/$file") : unlink("$directory/$file");
(is_dir("$directory/$file")) ? remove_directory("$directory/$file") : unlink("$directory/$file");
}
return rmdir($directory);
}