From 0ec17c3939ea89b353d9419da591a75fe44df6a2 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 2 Nov 2015 23:08:51 +0100 Subject: Add "--plaintextnames" option Also, gather all the command line arguments into an anonymous struct "args". --- cryptfs/config_file.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cryptfs') diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go index 16a3eec..de3054a 100644 --- a/cryptfs/config_file.go +++ b/cryptfs/config_file.go @@ -22,11 +22,13 @@ type ConfFile struct { ScryptObject scryptKdf // The On-Disk-Format version this filesystem uses Version uint16 + // Do not encrypt filenames + PlaintextNames bool } // CreateConfFile - create a new config with a random key encrypted with // "password" and write it to "filename" -func CreateConfFile(filename string, password string) error { +func CreateConfFile(filename string, password string, plaintextNames bool) error { var cf ConfFile cf.filename = filename @@ -39,10 +41,10 @@ func CreateConfFile(filename string, password string) error { cf.Version = HEADER_CURRENT_VERSION - // Write file to disk - err := cf.WriteFile() + cf.PlaintextNames = plaintextNames - return err + // Write file to disk + return cf.WriteFile() } // LoadConfFile - read config file from disk and decrypt the -- cgit v1.2.3