Skip to content

Commit

Permalink
Merge pull request #258 from FleekHQ/develop
Browse files Browse the repository at this point in the history
Release to master
  • Loading branch information
jsonsivar authored Nov 16, 2020
2 parents d4a1cce + 6a50906 commit 36be0a7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
12 changes: 10 additions & 2 deletions core/textile/sharing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
14 changes: 9 additions & 5 deletions core/textile/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 36be0a7

Please sign in to comment.