diff options
author | Git'Fellow <12234510+solracsf@users.noreply.github.com> | 2025-01-09 09:50:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 09:50:47 +0100 |
commit | cf2b197a1f0fef981010f98767f589939ca98d6e (patch) | |
tree | 6bf8576c85532eaaee2ab2032b2594b55e832d15 /lib/private | |
parent | a9d1d3440d4d7f2fc594e26919302732b46c7bb8 (diff) | |
parent | bb3e6ea9d915de56938c801f2e390fbe5c88d506 (diff) | |
download | nextcloud-server-cf2b197a1f0fef981010f98767f589939ca98d6e.tar.gz nextcloud-server-cf2b197a1f0fef981010f98767f589939ca98d6e.zip |
Merge pull request #49675 from nextcloud/backport/49262/stable29
[stable29] fix: don't do same-storage move optimization with encryption wrappers
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/Storage/Common.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index cff19e33dce..003bf9900ee 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -50,6 +50,7 @@ use OC\Files\Cache\Updater; use OC\Files\Cache\Watcher; use OC\Files\Filesystem; use OC\Files\ObjectStore\ObjectStoreStorage; +use OC\Files\Storage\Wrapper\Encryption; use OC\Files\Storage\Wrapper\Jail; use OC\Files\Storage\Wrapper\Wrapper; use OCP\Files\EmptyFileNameException; @@ -687,7 +688,10 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { * @return bool */ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) { - if ($this->isSameStorage($sourceStorage)) { + if ( + !$sourceStorage->instanceOfStorage(Encryption::class) && + $this->isSameStorage($sourceStorage) + ) { // resolve any jailed paths while ($sourceStorage->instanceOfStorage(Jail::class)) { /** |