Skip to content

Commit

Permalink
'fix' paths
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic committed May 25, 2021
1 parent b7c6628 commit d18452f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d18452f

Please sign in to comment.