diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index 733b7838760934c31177f99ea512e969dc761cfb..1cb457cb987d79bdfd9975391689471a8188d5ea 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']); } - } }