Skip to content

Commit

Permalink
fix value of file_target in shares
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Aug 6, 2021
1 parent 4be0e34 commit e46086e
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ 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, path.Base(info.Path))
data.Path = path.Join(h.sharePrefix, path.Base(info.Path))
}

Expand Down Expand Up @@ -791,7 +790,7 @@ func (h *Handler) addFileInfo(ctx context.Context, s *conversions.ShareData, inf
// TODO Storage: int
s.ItemSource = wrapResourceID(info.Id)
s.FileSource = s.ItemSource
s.FileTarget = path.Join("/", path.Base(info.Path))
s.FileTarget = path.Join(h.sharePrefix, path.Base(info.Path))
s.Path = path.Join("/", path.Base(info.Path)) // TODO hm this might have to be relative to the users home ... depends on the webdav_namespace config
// TODO FileParent:
// item type
Expand Down

0 comments on commit e46086e

Please sign in to comment.