[files-module] [pyrocms 3.8]Force delete folder error
aidanwatt opened this issue · comments
aidanwatt commented
Describe the bug
When force deleting a folder from trash an error is thrown and the operation doesn't fully complete.
League \ Flysystem \ FileNotFoundException File not found at path: folder_name
To Reproduce
- Create a new folder
- Delete the folder
- Goto trash and force delete folder
- See error
Expected behavior
No error thrown, operation completes
Additional context
I think this may be caused by this method on \Anomaly\FilesModule\Disk\Adapter\AdapterFilesystem getting itself into a loop:
public function deleteDir($dirname)
{
$result = parent::deleteDir($dirname);
if ($result && $resource = $this->get($dirname)) {
return $this->dispatch(new DeleteFolder($resource));
}
return $result;
}
Ryan Thompson commented
This has been resolved: anomalylabs/files-module@a31e5c6
Thanks for the report!