summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/main.go b/main.go
index 06864d5..1fdd242 100644
--- a/main.go
+++ b/main.go
@@ -61,11 +61,13 @@ func initDir(args *argContainer) {
os.Exit(ERREXIT_INIT)
}
- // Create gocryptfs.diriv in the root dir
- err = cryptfs.WriteDirIV(args.cipherdir)
- if err != nil {
- fmt.Println(err)
- os.Exit(ERREXIT_INIT)
+ if args.diriv && !args.plaintextnames {
+ // Create gocryptfs.diriv in the root dir
+ err = cryptfs.WriteDirIV(args.cipherdir)
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(ERREXIT_INIT)
+ }
}
cryptfs.Info.Printf("The filesystem is now ready for mounting.\n")