-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix ocs api shared with me response #1346
Conversation
@@ -813,6 +815,9 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) { | |||
continue | |||
} | |||
h.addDisplaynames(r.Context(), gwc, data) | |||
// Needed because received shares can be jailed in a folder in the users home | |||
data.FileTarget = path.Join(h.sharePrefix, path.Base(info.Path)) | |||
data.Path = path.Join(h.sharePrefix, path.Base(info.Path)) |
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.
hm, the info.Path should already contain the share prefix ... ah wait, the request firts queries the share manager, which only knows file ids, and then sends a stat request to the storage provider to fill in the file details.
@labkode Another reason why I think we need a service that keeps track of mountpoints. IMO that is the storage registry. It should know the file reference and the mount point. then it can cache the etag for every root, especially the shares. We can then change this hardcoded SharePrefix to an arbitrary location in the users home and calculate the etag based on the information that is cached in the storage registry.
For now this is LGTM
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.
hm, the info.Path should already contain the share prefix ... ah wait, the request firts queries the share manager, which only knows file ids, and then sends a stat request to the storage provider to fill in the file details.
Yes, exactly that was the problem here. 🙈
@C0rby the tests seem to indicate that only accepted shares get the prefix. |
Yes, in oC10 when a user asks for the shares that are waiting to be accepted (pending) |
6c2ef5d
to
f373826
Compare
f373826
to
9afe62a
Compare
9afe62a
to
7a1e5e4
Compare
The path of the files shared with me was incorrect. It was missing the share directory.
Fixes: owncloud/product#204