From 24128d1384f2548f0cdc35c26d684dbeb61d091b Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 24 Apr 2015 10:16:06 +0200 Subject: only update share keys if the file was encrypted --- lib/private/encryption/keys/storage.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/private/encryption/keys') diff --git a/lib/private/encryption/keys/storage.php b/lib/private/encryption/keys/storage.php index e34d7370ef1..118c8dc920d 100644 --- a/lib/private/encryption/keys/storage.php +++ b/lib/private/encryption/keys/storage.php @@ -235,6 +235,7 @@ class Storage implements IStorage { * * @param string $source * @param string $target + * @return boolean */ public function renameKeys($source, $target) { @@ -253,7 +254,11 @@ class Storage implements IStorage { if ($this->view->file_exists($sourcePath)) { $this->keySetPreparation(dirname($targetPath)); $this->view->rename($sourcePath, $targetPath); + + return true; } + + return false; } /** @@ -261,6 +266,7 @@ class Storage implements IStorage { * * @param string $source * @param string $target + * @return boolean */ public function copyKeys($source, $target) { @@ -279,7 +285,10 @@ class Storage implements IStorage { if ($this->view->file_exists($sourcePath)) { $this->keySetPreparation(dirname($targetPath)); $this->view->copy($sourcePath, $targetPath); + return true; } + + return false; } /** -- cgit v1.2.3