summaryrefslogtreecommitdiff
path: root/cryptfs/filter.go
blob: 079b64f455dd8439271d378a101c14dd47732d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 == "gocryptfs.conf" {
		Warn.Printf("The name \"/gocryptfs.conf\" is reserved when \"--plaintextnames\" is used\n")
		return true
	}
	return false
}