mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
fix #1154
This commit is contained in:
parent
3d2b9e2e23
commit
f5618feb73
3 changed files with 13 additions and 8 deletions
|
@ -78,10 +78,12 @@ function pdoDrivers() {
|
|||
* Here in case of .gitignore files
|
||||
*/
|
||||
|
||||
function delTree($dir, $withdirectory="true") {
|
||||
$files = array_diff(scandir($dir), array('.','..'));
|
||||
foreach ($files as $file) {
|
||||
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
|
||||
function delTree($dir, $withdirectory=true, $hiddenfiles = true) {
|
||||
if ($hiddenfiles) {
|
||||
$files = array_diff(scandir($dir), array('.','..'));
|
||||
foreach ($files as $file) {
|
||||
(is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
|
||||
}
|
||||
}
|
||||
if ($withdirectory) {
|
||||
return rmdir($dir);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue