2015-11-03 22:25:29 +01:00
|
|
|
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
|
2015-11-15 13:38:19 +01:00
|
|
|
if be.plaintextNames == true && path == ConfDefaultName {
|
|
|
|
Warn.Printf("The name /%s is reserved when -plaintextnames is used\n",
|
|
|
|
ConfDefaultName)
|
2015-11-03 22:25:29 +01:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|