summaryrefslogtreecommitdiff
path: root/cryptfs/filter.go
blob: f80889d8832e51d14b63620d54d855ea5f82338c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package cryptfs

// IsFiltered - check if "path" should be forbidden
//
// Used to prevent name clashes with gocryptfs.conf
// when file names are not encrypted
func (be *CryptFS) IsFiltered(path string) bool {
	// gocryptfs.conf in the root directory is forbidden
	if be.plaintextNames == true && path == ConfDefaultName {
		Warn.Printf("The name /%s is reserved when -plaintextnames is used\n",
			ConfDefaultName)
		return true
	}
	return false
}