diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-01 20:29:07 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-05-01 20:29:07 -0400 |
commit | 04b7a9902d113f51c1da12a1bc0bd1b0cb975ae4 (patch) | |
tree | 7c53aff44237004e94c46bda2b5dd018c22e75ca /apps/files_sharing | |
parent | 2040f0af78bbe73fb477367646183b880348ad86 (diff) | |
download | nextcloud-server-04b7a9902d113f51c1da12a1bc0bd1b0cb975ae4.tar.gz nextcloud-server-04b7a9902d113f51c1da12a1bc0bd1b0cb975ae4.zip |
Fix #2816 renaming shared files
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/cache.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 9fccd0b46f3..a2b7e22d1b3 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -182,12 +182,10 @@ class Shared_Cache extends Cache { */ public function move($source, $target) { if ($cache = $this->getSourceCache($source)) { - $targetPath = \OC_Share_Backend_File::getSourcePath(dirname($target)); - if ($targetPath) { - $targetPath .= '/' . basename($target); - $cache->move($this->files[$source], $targetPath); + $file = \OC_Share_Backend_File::getSource($target); + if ($file && isset($file['path'])) { + $cache->move($this->files[$source], $file['path']); } - } } |