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 Feb 16, 2022
1 parent b9a56ee commit 7277327
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 @@ -115,7 +115,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 7277327

Please sign in to comment.