Skip to content
Snippets Groups Projects
Commit 22bc622f authored by Vincent Petry's avatar Vincent Petry
Browse files

Move keys instead of copy during encryption key migration

parent 89735ab2
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,7 @@ class Migration {
$extension = $this->getExtension($file, $trash);
$targetDir = $this->getTargetDir($user, $filePath, $filename, $extension, $trash);
$this->createPathForKeys($targetDir);
$this->view->copy($path . '/' . $file, $targetDir . '/fileKey');
$this->view->rename($path . '/' . $file, $targetDir . '/fileKey');
$this->renameShareKeys($user, $filePath, $filename, $targetDir, $trash);
}
}
......@@ -267,7 +267,7 @@ class Migration {
if (substr($file, 0, strlen($filename) + 1) === $filename . '.') {
$uid = $this->getUidFromShareKey($file, $filename, $trash);
$this->view->copy($oldShareKeyPath . '/' . $file, $target . '/' . $uid . '.shareKey');
$this->view->rename($oldShareKeyPath . '/' . $file, $target . '/' . $uid . '.shareKey');
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment