Don't attempt to delete directories

This commit is contained in:
Jay Trees 2022-01-21 14:54:53 +01:00
parent d2120b9b61
commit e53a379c71

View file

@ -15,7 +15,7 @@ function delete_directory(string $directoryToDelete)
$filepath = $directoryToDelete . '/' . $filename;
if (is_file($filepath)) {
if (is_file($filepath) && !is_dir($filepath)) {
unlink($filepath);
}