diff --git a/libraries/joomla/filesystem/file.php b/libraries/joomla/filesystem/file.php index 49c6eafa3c05f..f1d80637ce0dd 100644 --- a/libraries/joomla/filesystem/file.php +++ b/libraries/joomla/filesystem/file.php @@ -189,7 +189,12 @@ public static function delete($file) foreach ($files as $file) { $file = JPath::clean($file); - + + if (!is_file($file)) + { + continue; + } + // Try making the file writable first. If it's read-only, it can't be deleted // on Windows, even if the parent folder is writable @chmod($file, 0777);