diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-24 10:16:06 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-24 10:19:09 +0200 |
commit | 24128d1384f2548f0cdc35c26d684dbeb61d091b (patch) | |
tree | 3ae27c27d8c681ce45b6b2ac1fe8315125e631c6 /lib/private/encryption | |
parent | 2646bccb83d06f575722e3fb8c5bd87ed42775c9 (diff) | |
download | nextcloud-server-24128d1384f2548f0cdc35c26d684dbeb61d091b.tar.gz nextcloud-server-24128d1384f2548f0cdc35c26d684dbeb61d091b.zip |
only update share keys if the file was encrypted
Diffstat (limited to 'lib/private/encryption')
-rw-r--r-- | lib/private/encryption/keys/storage.php | 9 |
1 files changed, 9 insertions, 0 deletions
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; } /** |