Mercurial > hg > mgallery
changeset 62:3f60a5f5b4b3
Actually fix checking for files to be deleted to work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 13 Sep 2016 00:03:06 +0300 |
parents | ee82f7c8d44c |
children | 1c32ece9acde |
files | mgtool.php |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mgtool.php Mon Sep 12 23:58:28 2016 +0300 +++ b/mgtool.php Tue Sep 13 00:03:06 2016 +0300 @@ -311,11 +311,9 @@ closedir($dirHandle); echo " - ".$path." [DIR]\n"; + $countDoDelete++; if ($flagDoDelete) - { - $countDoDelete++; rmdir($path); - } } else if (file_exists($path)) @@ -323,11 +321,9 @@ if (!$recurse) echo " - ".$path."\n"; + $countDoDelete++; if ($flagDoDelete) - { - $countDoDelete++; unlink($path); - } } }