aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-08-16 20:18:13 +0200
committerRobin Appelman <robin@icewind.nl>2018-08-27 16:25:45 +0200
commit237e4b75219e91b5b684b9907f19c7ddc73543cb (patch)
treef13d82c8f80c620f2047d082db02d61c4e714476
parenta396c376937397fb75bbd55c1180cba6e3dc414b (diff)
downloadnextcloud-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.php4
-rw-r--r--apps/files_sharing/lib/SharedMount.php2
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);
}