From: Jerome Jutteau Date: Mon, 29 Jul 2013 20:03:41 +0000 (+0000) Subject: Add check if clean_rm_file X-Git-Tag: 1.1~200 X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/c4b50888f400fd7e0442431e859010450b55af4b?hp=b66edd26d7bb21c50dbfa8a178ebe3ec8b608a85 Add check if clean_rm_file --- diff --git a/lib/functions.php b/lib/functions.php index a8851aa..1ad0e52 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -122,10 +122,11 @@ function jirafeau_clean_rm_file ($md5) { $p = s2p ("$md5"); - if (file_exists (VAR_FILES . $p . $md5)) - unlink (VAR_FILES . $p . $md5); - if (file_exists (VAR_FILES . $p . $md5 . '_count')) - unlink (VAR_FILES . $p . $md5 . '_count'); + $f = VAR_FILES . $p . $md5; + if (file_exists ($f) && is_file ($f)) + unlink ($f); + if (file_exists ($f . '_count') && is_file ($f . '_count')) + unlink ($f . '_count'); $parse = VAR_FILES . $p; $scan = array(); while (file_exists ($parse)