don't check if target dir exists when using the default share target directory

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-08-16 20:18:13 +02:00
parent a396c37693
commit 237e4b7521
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
2 changed files with 5 additions and 1 deletions

View File

@ -237,6 +237,10 @@ class Helper {
return $path;
}
public static function isUsingShareFolder() {
return \OC::$server->getConfig()->getSystemValue('share_folder', '/') !== '/';
}
/**
* get default share folder
*

View File

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