Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/private/Files/Storage/Wrapper/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,9 @@ private function copyBetweenStorage(Storage $sourceStorage, $sourceInternalPath,
} else {
try {
$source = $sourceStorage->fopen($sourceInternalPath, 'r');
if ($isRename) {
$this->sourcePath[$targetInternalPath] = $sourceStorage->getFullPath($sourceInternalPath);
if ($isRename && (count($mount) === 1)) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way $mount is not used without defining. The path obtained using this method and getFullPath in the scenario of transfer file onwership between users ( with masterkey encryption ), both path remains same.

$sourceStorageMountPoint = $mount[0]->getMountPoint();
$this->sourcePath[$targetInternalPath] = $sourceStorageMountPoint . '/' . $sourceInternalPath;
} else {
unset($this->sourcePath[$targetInternalPath]);
}
Expand Down