Skip to content

Commit

Permalink
Fix: Ignore .DS_Store and other meta files (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
perfectmak authored Nov 16, 2020
1 parent 7372f20 commit 9fc3b12
Showing 1 changed file with 9 additions and 5 deletions.
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 9fc3b12

Please sign in to comment.