diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-21 14:06:45 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-05-21 14:06:45 +0200 |
commit | 38bceb0d744357fc25cf0353989aa59f1bdcf11c (patch) | |
tree | b8f42563f65ecf4195358af33260d6ca3cdbfa81 /lib/private/encryption | |
parent | 896130b68d4712ec9ced3561036bc435e7e5a2dc (diff) | |
download | nextcloud-server-38bceb0d744357fc25cf0353989aa59f1bdcf11c.tar.gz nextcloud-server-38bceb0d744357fc25cf0353989aa59f1bdcf11c.zip |
distinguish between source and target mount point to allow copy/rename between system wide mount points and user specific mountpoints
Diffstat (limited to 'lib/private/encryption')
-rw-r--r-- | lib/private/encryption/keys/storage.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/private/encryption/keys/storage.php b/lib/private/encryption/keys/storage.php index 6aa00c5b5ee..1d2638b4504 100644 --- a/lib/private/encryption/keys/storage.php +++ b/lib/private/encryption/keys/storage.php @@ -233,13 +233,18 @@ class Storage implements IStorage { list($owner, $source) = $this->util->getUidAndFilename($source); list(, $target) = $this->util->getUidAndFilename($target); - $systemWide = $this->util->isSystemWideMountPoint($target, $owner); + $systemWideSource = $this->util->isSystemWideMountPoint($source, $owner); + $systemWideTarget = $this->util->isSystemWideMountPoint($target, $owner); - if ($systemWide) { + if ($systemWideSource) { $sourcePath = $this->keys_base_dir . $source . '/'; - $targetPath = $this->keys_base_dir . $target . '/'; } else { $sourcePath = '/' . $owner . $this->keys_base_dir . $source . '/'; + } + + if ($systemWideTarget) { + $targetPath = $this->keys_base_dir . $target . '/'; + } else { $targetPath = '/' . $owner . $this->keys_base_dir . $target . '/'; } @@ -264,13 +269,17 @@ class Storage implements IStorage { list($owner, $source) = $this->util->getUidAndFilename($source); list(, $target) = $this->util->getUidAndFilename($target); - $systemWide = $this->util->isSystemWideMountPoint($target, $owner); + $systemWideTarget = $this->util->isSystemWideMountPoint($target, $owner); + $systemWideSource = $this->util->isSystemWideMountPoint($source, $owner); - if ($systemWide) { + if ($systemWideSource) { $sourcePath = $this->keys_base_dir . $source . '/'; - $targetPath = $this->keys_base_dir . $target . '/'; } else { $sourcePath = '/' . $owner . $this->keys_base_dir . $source . '/'; + } + if ($systemWideTarget) { + $targetPath = $this->keys_base_dir . $target . '/'; + } else { $targetPath = '/' . $owner . $this->keys_base_dir . $target . '/'; } |