diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go index f88d715a64b..b323a033d5c 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go @@ -111,8 +111,8 @@ func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, sh // But if a request DOES use an id, the Ref contains the same id? at least in the Ref part of the ResouceInfo // In the Id of a Resoucre info the storageid and node id are always set. // so ... if info.Ref.StorageId != "" -> use /dav/spaces path, otherwise use path and append it to webdav endpoint - data.FileTarget = path.Join(h.sharePrefix, info.Ref.Path) - data.Path = path.Join(h.sharePrefix, info.Ref.Path) + data.FileTarget = path.Join(h.sharePrefix, path.Base(info.Ref.Path)) // FIXME @butonic REFERENCES use same "wrong" path!!!! + data.Path = path.Join(h.sharePrefix, path.Base(info.Ref.Path)) } response.WriteOCSSuccess(w, r, data) diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index d7442603ddf..cfa53438942 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -647,8 +647,8 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) { if data.State == ocsStateAccepted { // Needed because received shares can be jailed in a folder in the users home - data.FileTarget = path.Join(h.sharePrefix, info.Ref.Path) - data.Path = path.Join(h.sharePrefix, info.Ref.Path) + data.FileTarget = path.Join(h.sharePrefix, path.Base(info.Ref.Path)) + data.Path = path.Join(h.sharePrefix, path.Base(info.Ref.Path)) } shares = append(shares, data)