diff --git a/core/textile/sharing.go b/core/textile/sharing.go index 07eca812..71821a8d 100644 --- a/core/textile/sharing.go +++ b/core/textile/sharing.go @@ -319,9 +319,17 @@ func (tc *textileClient) buildInvitationSharedDirEntry( }) } + fileBucket := file.Bucket + fileDbID := file.DbID + + if isSentFiles { + fileBucket = defaultPersonalBucketSlug + fileDbID = "" + } + res := &domain.SharedDirEntry{ - Bucket: file.Bucket, - DbID: file.DbID, + Bucket: fileBucket, + DbID: fileDbID, FileInfo: domain.FileInfo{ IpfsHash: ipfsHash, LocallyAvailable: isSentFiles, diff --git a/core/textile/utils/utils.go b/core/textile/utils/utils.go index b4b95763..ab2ad967 100644 --- a/core/textile/utils/utils.go +++ b/core/textile/utils/utils.go @@ -145,14 +145,18 @@ func RandBytes(size int) ([]byte, error) { return b, err } +var metaFileNames = map[string]bool{ + ".textileseed": true, + ".textile": true, + ".DS_Store": true, + ".Trashes": true, + ".localized": true, +} + func IsMetaFileName(pathOrName string) bool { _, name := filepath.Split(pathOrName) - if name == ".textileseed" || name == ".textile" { - return true - } - - return false + return metaFileNames[name] } const threadIDStoreKey = "thread_id"