Commit 24779fb9 authored by Michael Oehlhof's avatar Michael Oehlhof Committed by Frank Nägler
Browse files

[BUGFIX] Renaming files on non LocalDriver storages

Fixing determination of the parent folder of a file inside the
storage, so it can be used as destination for the renaming.

Resolves: #83628
Releases: master, 8.7
Change-Id: I2b905dc7ba5e3d6fa8bec2b5a728d27f3c4a3258
Reviewed-on: https://review.typo3.org/55421

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Reviewed-by: Tymoteusz Motylewski's avatarTymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
parent 1ddea2f5
......@@ -204,7 +204,7 @@ class RenameFileController
$fileIdentifier = $this->fileOrFolderObject->getUid();
$targetLabel = 'file_rename.php.label.target.file';
$assigns['conflictMode'] = DuplicationBehavior::cast(DuplicationBehavior::RENAME);
$assigns['destination'] = substr($this->fileOrFolderObject->getCombinedIdentifier(), 0, -strlen($this->fileOrFolderObject->getName()));
$assigns['destination'] = $this->fileOrFolderObject->getParentFolder()->getCombinedIdentifier();
}
$assigns['fileName'] = $this->fileOrFolderObject->getName();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment