Merge pull request #3211 from owncloud/fix-2816

Fix #2816 renaming shared files
This commit is contained in:
Frank Karlitschek 2013-05-02 00:54:09 -07:00
commit 8a5e88b21c
1 changed files with 3 additions and 5 deletions

View File

@ -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']);
}
}
}