From 6748fba80535be4e2283665d35d8f50cc0ad4feb Mon Sep 17 00:00:00 2001 From: Sujith H Date: Tue, 24 Oct 2017 16:32:55 +0530 Subject: [PATCH] Call getFullPath only if its defined in storage Call getFullPath only if its defined in storage. Else use mount point to resolve the full path. Signed-off-by: Sujith H --- lib/private/Files/Storage/Wrapper/Encryption.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index baa2b7f1618e..270b27020674 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -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)) { + $sourceStorageMountPoint = $mount[0]->getMountPoint(); + $this->sourcePath[$targetInternalPath] = $sourceStorageMountPoint . '/' . $sourceInternalPath; } else { unset($this->sourcePath[$targetInternalPath]); }