diff options
author | Robin Appelman <robin@icewind.nl> | 2018-08-16 20:18:13 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-08-27 16:25:45 +0200 |
commit | 237e4b75219e91b5b684b9907f19c7ddc73543cb (patch) | |
tree | f13d82c8f80c620f2047d082db02d61c4e714476 | |
parent | a396c376937397fb75bbd55c1180cba6e3dc414b (diff) | |
download | nextcloud-server-237e4b75219e91b5b684b9907f19c7ddc73543cb.tar.gz nextcloud-server-237e4b75219e91b5b684b9907f19c7ddc73543cb.zip |
don't check if target dir exists when using the default share target directory
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_sharing/lib/Helper.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedMount.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Helper.php b/apps/files_sharing/lib/Helper.php index c8f46fa8132..465a55a0052 100644 --- a/apps/files_sharing/lib/Helper.php +++ b/apps/files_sharing/lib/Helper.php @@ -237,6 +237,10 @@ class Helper { return $path; } + public static function isUsingShareFolder() { + return \OC::$server->getConfig()->getSystemValue('share_folder', '/') !== '/'; + } + /** * get default share folder * diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index 9a801311a41..dacc78edac3 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -89,7 +89,7 @@ class SharedMount extends MountPoint implements MoveableMount { $mountPoint = basename($share->getTarget()); $parent = dirname($share->getTarget()); - if (!$this->recipientView->is_dir($parent)) { + if (Helper::isUsingShareFolder() && !$this->recipientView->is_dir($parent)) { $parent = Helper::getShareFolder($this->recipientView); } |