Don't attempt to delete directories
This commit is contained in:
parent
d2120b9b61
commit
e53a379c71
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue