diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-03-13 23:33:49 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-03-13 23:33:49 +0100 |
commit | f5618feb73343f0a120a809116c443630d70a87c (patch) | |
tree | f544c7db283dd77a1c639de7b5299df0490f61ff /install/install_functions.php | |
parent | 3d2b9e2e237780e8f2a207e1b964b32679407265 (diff) | |
download | wallabag-f5618feb73343f0a120a809116c443630d70a87c.tar.gz wallabag-f5618feb73343f0a120a809116c443630d70a87c.tar.zst wallabag-f5618feb73343f0a120a809116c443630d70a87c.zip |
fix #1154
Diffstat (limited to 'install/install_functions.php')
-rw-r--r-- | install/install_functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/install/install_functions.php b/install/install_functions.php index 3cfe13fb..a40db373 100644 --- a/install/install_functions.php +++ b/install/install_functions.php | |||
@@ -78,10 +78,12 @@ function pdoDrivers() { | |||
78 | * Here in case of .gitignore files | 78 | * Here in case of .gitignore files |
79 | */ | 79 | */ |
80 | 80 | ||
81 | function delTree($dir, $withdirectory="true") { | 81 | function delTree($dir, $withdirectory=true, $hiddenfiles = true) { |
82 | $files = array_diff(scandir($dir), array('.','..')); | 82 | if ($hiddenfiles) { |
83 | foreach ($files as $file) { | 83 | $files = array_diff(scandir($dir), array('.','..')); |
84 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | 84 | foreach ($files as $file) { |
85 | (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); | ||
86 | } | ||
85 | } | 87 | } |
86 | if ($withdirectory) { | 88 | if ($withdirectory) { |
87 | return rmdir($dir); | 89 | return rmdir($dir); |