Fix #2816 renaming shared files
This commit is contained in:
parent
2040f0af78
commit
04b7a9902d
|
@ -182,12 +182,10 @@ class Shared_Cache extends Cache {
|
||||||
*/
|
*/
|
||||||
public function move($source, $target) {
|
public function move($source, $target) {
|
||||||
if ($cache = $this->getSourceCache($source)) {
|
if ($cache = $this->getSourceCache($source)) {
|
||||||
$targetPath = \OC_Share_Backend_File::getSourcePath(dirname($target));
|
$file = \OC_Share_Backend_File::getSource($target);
|
||||||
if ($targetPath) {
|
if ($file && isset($file['path'])) {
|
||||||
$targetPath .= '/' . basename($target);
|
$cache->move($this->files[$source], $file['path']);
|
||||||
$cache->move($this->files[$source], $targetPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue