From 99e95f2977f919076cdb94b64da7bd4a4f60a25c Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Fri, 13 Sep 2024 15:58:46 +0200 Subject: [PATCH] fix: Move version instead of copying it when restoring Signed-off-by: Louis Chemineau --- lib/Versions/VersionsBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Versions/VersionsBackend.php b/lib/Versions/VersionsBackend.php index 6657b2907..7c16c3277 100644 --- a/lib/Versions/VersionsBackend.php +++ b/lib/Versions/VersionsBackend.php @@ -221,8 +221,8 @@ public function rollback(IVersion $version): void { $targetInternalPath = $version->getSourceFile()->getInternalPath(); $versionInternalPath = $version->getVersionFile()->getInternalPath(); - $targetMount->getStorage()->copyFromStorage($versionMount->getStorage(), $versionInternalPath, $targetInternalPath); - $versionMount->getStorage()->getCache()->copyFromCache($targetCache, $versionCache->get($versionInternalPath), $targetMount->getSourcePath() . '/' . $targetInternalPath); + $targetMount->getStorage()->moveFromStorage($versionMount->getStorage(), $versionInternalPath, $targetInternalPath); + $versionMount->getStorage()->getCache()->moveFromCache($targetCache, $versionCache->get($versionInternalPath), $targetMount->getSourcePath() . '/' . $targetInternalPath); } public function read(IVersion $version) {