pyrocms / pyrocms

Pyro is an experienced and powerful Laravel PHP CMS.

Home Page:https://www.pyrocms.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[files-module] [pyrocms 3.8]Force delete folder error

aidanwatt opened this issue · comments

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

  1. Create a new folder
  2. Delete the folder
  3. Goto trash and force delete folder
  4. 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;
    }

This has been resolved: anomalylabs/files-module@a31e5c6

Thanks for the report!