Skip to content

Commit

Permalink
[files_sharing] dont automatically update file_target if it starts wi…
Browse files Browse the repository at this point in the history
…th a / (nextcloud#12548)

needed by craig/autoshare#15 when we explicitely set file_target
to present file in a subdir.
  • Loading branch information
landryb committed Mar 16, 2020
1 parent 34e5909 commit 4e640d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/files_sharing/lib/SharedMount.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ private function verifyMountPoint(\OCP\Share\IShare $share, array $mountpoints,
);

if ($newMountPoint !== $share->getTarget()) {
$this->updateFileTarget($newMountPoint, $share);
if (strpos($share->getTarget(),'/',1)) {
return $share->getTarget();
} else {
$this->updateFileTarget($newMountPoint, $share);
}
}

return $newMountPoint;
Expand Down

0 comments on commit 4e640d3

Please sign in to comment.