-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhancement: unique mount point path #4714
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicking. Rest looks good 👍
internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/export_test.go
Show resolved
Hide resolved
34fb97a
to
15bb511
Compare
@rhafer is right with the strange tar handling, i removed it, lets see what the ci is saying, but i want to revisit this in a sec... i have a idea |
Ok, let’s move on and remove it if you’re fine with it too, |
var requestedMountpoint string | ||
switch { | ||
case slices.Contains(req.GetUpdateMask().GetPaths(), _fieldMaskPathMountPoint) && req.GetShare().GetMountPoint().GetPath() != "": | ||
requestedMountpoint = req.GetShare().GetMountPoint().GetPath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still not completely sure about the semantics when the incoming request actually contains a MountPoint. I think in that case we should not do the game with the suffix number.
I'd prefer to be explicit in that case and make the request fail with an appropriate Status if the mountpoint is already taken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m with you, but that means clients have to implement that a user can change the mount point name (I would prefer that too).
but that needs some time, maybe we should merge it that way, talk to the clients and then change it to error in the case of explicit conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m with you, but that means clients have to implement that a user can change the mount point name (I would prefer that too).
Hm, I am not sure I get that. Clients (as in CS3 clients) are already able to change the mount point name, aren't they?
The fact that our currently used clients at the higher-level (every thing that comes in via libregraph e.g.) don't make use of that does not change that. But in that case they shouldn't send a mountpoint at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively I'd be find if we'd just not allow UpdateReceivedShare Request with a _fieldMaskPathMountPoint
at all for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me for now 👍
15bb511
to
dc36341
Compare
dc36341
to
4c01ace
Compare
This PR introduces a new feature that ensures all mounted shares have a unique path. This is achieved by checking for potential name collisions against existing mount points and adjusting the mount point name if necessary.
Overview:
This enhances the robustness of the share mounting process and prevents potential issues caused by duplicate mounts.
before
after