summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2013-05-02 00:54:09 -0700
committerFrank Karlitschek <frank@owncloud.org>2013-05-02 00:54:09 -0700
commit8a5e88b21cf95f8d0f964ee012f15e447644a10f (patch)
tree356364abdca5bb9a371f3bf41541a5177c0b6870 /apps
parentee53e7b3d232d0122e19b685a689a43c52b1a1c0 (diff)
parent04b7a9902d113f51c1da12a1bc0bd1b0cb975ae4 (diff)
downloadnextcloud-server-8a5e88b21cf95f8d0f964ee012f15e447644a10f.tar.gz
nextcloud-server-8a5e88b21cf95f8d0f964ee012f15e447644a10f.zip
Merge pull request #3211 from owncloud/fix-2816
Fix #2816 renaming shared files
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/cache.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 733b7838760..1cb457cb987 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']);
}
-
}
}