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 0f84994e73
commit e9c9754cec
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

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