diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-04-20 16:46:35 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-27 14:07:16 +0200 |
commit | 45784f213f5e7cf9a38feabd52c4ffadee9ae4f9 (patch) | |
tree | 4e0b8825da0b1c1e7ee5bfa96141d407c5db9c14 /apps | |
parent | f488624e5ff3a8f580029e98373071d6fe91e2eb (diff) | |
download | nextcloud-server-45784f213f5e7cf9a38feabd52c4ffadee9ae4f9.tar.gz nextcloud-server-45784f213f5e7cf9a38feabd52c4ffadee9ae4f9.zip |
fix propagation when renaming a directly reshared folder
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/propagation/changewatcher.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/propagation/changewatcher.php b/apps/files_sharing/lib/propagation/changewatcher.php index 33048081f9c..483f436e289 100644 --- a/apps/files_sharing/lib/propagation/changewatcher.php +++ b/apps/files_sharing/lib/propagation/changewatcher.php @@ -9,6 +9,7 @@ namespace OCA\Files_Sharing\Propagation; use OC\Files\Cache\ChangePropagator; +use OC\Files\Filesystem; use OC\Files\View; use OCA\Files_Sharing\SharedMount; @@ -47,10 +48,10 @@ class ChangeWatcher { $fullPath2 = $this->baseView->getAbsolutePath($path2); $mount1 = $this->baseView->getMount($path1); $mount2 = $this->baseView->getMount($path2); - if ($mount1 instanceof SharedMount) { + if ($mount1 instanceof SharedMount and $mount1->getInternalPath($fullPath1) !== '') { $this->propagateForOwner($mount1->getShare(), $mount1->getInternalPath($fullPath1), $mount1->getOwnerPropagator()); } - if ($mount1 !== $mount2 and $mount2 instanceof SharedMount) { + if ($mount1 !== $mount2 and $mount2 instanceof SharedMount and $mount2->getInternalPath($fullPath2) !== '') { $this->propagateForOwner($mount2->getShare(), $mount2->getInternalPath($fullPath2), $mount2->getOwnerPropagator()); } } @@ -67,6 +68,7 @@ class ChangeWatcher { $shareRootPath = $view->getPath($share['item_source']); if (!is_null($shareRootPath)) { $path = $shareRootPath . '/' . $internalPath; + $path = Filesystem::normalizePath($path); $propagator->addChange($path); $propagator->propagateChanges(); } |