From c4b50888f400fd7e0442431e859010450b55af4b Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Mon, 29 Jul 2013 20:03:41 +0000 Subject: [PATCH] Add check if clean_rm_file --- lib/functions.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.34.1