diff options
Diffstat (limited to 'cryptfs')
-rw-r--r-- | cryptfs/filter.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cryptfs/filter.go b/cryptfs/filter.go new file mode 100644 index 0000000..079b64f --- /dev/null +++ b/cryptfs/filter.go @@ -0,0 +1,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 +} |