Skip to content

Commit

Permalink
fix: Move version instead of copying it when restoring
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Sep 13, 2024
1 parent eebc9ad commit 20ab61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Versions/VersionsBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function rollback(IVersion $version): void {
$targetInternalPath = $version->getSourceFile()->getInternalPath();
$versionInternalPath = $version->getVersionFile()->getInternalPath();

$targetMount->getStorage()->copyFromStorage($versionMount->getStorage(), $versionInternalPath, $targetInternalPath);
$targetMount->getStorage()->moveFromStorage($versionMount->getStorage(), $versionInternalPath, $targetInternalPath);
$versionMount->getStorage()->getCache()->copyFromCache($targetCache, $versionCache->get($versionInternalPath), $targetMount->getSourcePath() . '/' . $targetInternalPath);
}

Expand Down

0 comments on commit 20ab61c

Please sign in to comment.