Open skurrilewelt opened 2 weeks ago
Hey, thanks for opening this issue.
print_r($this->isDir("root/content/subdir"));
Check this and see what result you will get, it must be true
, otherwise we will use another method listDirDetails
to see details about the file root/content/subdir
and guess what the problem with it!
I think, it is obvious. You can't call rmdir because it won't delete directories which are not empty.
The removeDir
method should delete everything within a directory whether it's a file or a directory.
Tried to remove a directory structure like this:
-root --content ----file1 ----file2 ----subdir ------file4 ------file3
and the method FtpClient::removeDir(directory) doesn't jumps in to the subdir and as a result the directory content will not be deleted as intended.
Change line 373 in mentioned class to:
$this->removeDir($fileInfo['path']);
will solve this issue. Or miss I something?