-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Creating/renaming a directory in the file manager generates this error:
Call to undefined method League\Flysystem\Filesystem::rename()
It looks like the function rename() only exists in V1 of the Flysystem Filesystem API.
In V2 (that is used by MODX 3) it probably has to be replaced with the function move():
FileSluggy/core/components/filesluggy/model/filesluggy/filesluggy.class.php
Lines 384 to 397 in f9917e5
| try { | |
| return $source->getFilesystem()->rename($oldPath, $newPath); | |
| } catch (Exception $exception) { | |
| $tmpName = $newPath . '-tmp-' . time(); | |
| $source->getFilesystem()->rename($oldPath, $tmpName); | |
| $source->getFilesystem()->getAdapter()->getCache()->flush(); | |
| try { | |
| return $source->getFilesystem()->rename($tmpName, $newPath); | |
| } catch (Exception $exception) { | |
| $this->modx->log(xPDO::LOG_LEVEL_ERROR, '[FileSluggy] Failed renaming directory: ' . $exception->getMessage()); | |
| } | |
| } |
(Also, $source->getFilesystem()->getAdapter()->getCache()->flush(); doesn't seem to work either.)
MODX 3.0.3-pl
FileSluggy 1.3.5-pl
Metadata
Metadata
Assignees
Labels
No labels