diff --git a/changelog/unreleased/full-path-on-share-info.md b/changelog/unreleased/full-path-on-share-info.md new file mode 100644 index 0000000000..51f582b84b --- /dev/null +++ b/changelog/unreleased/full-path-on-share-info.md @@ -0,0 +1,4 @@ +Bugfix: Retrieve the full path of a share when setting as +accepted or on shared by me + +https://github.com/cs3org/reva/pull/2177 \ No newline at end of file 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 afc3252811..c7006a2f72 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 @@ -848,10 +848,10 @@ func (h *Handler) addFileInfo(ctx context.Context, s *conversions.ShareData, inf s.ItemSource = wrapResourceID(info.Id) s.FileSource = s.ItemSource switch { - case s.ShareType == conversions.ShareTypePublicLink: - s.FileTarget = path.Join("/", path.Base(info.Path)) - s.Path = path.Join("/", path.Base(info.Path)) case h.sharePrefix == "/": + s.FileTarget = info.Path + s.Path = info.Path + case s.ShareType == conversions.ShareTypePublicLink: s.FileTarget = path.Join("/", path.Base(info.Path)) s.Path = path.Join("/", path.Base(info.Path)) default: