aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-10 01:12:05 +0100
committerJakob Unterwurzacher2015-12-10 01:12:05 +0100
commitccf6d00728a8cb107ae2a829f89e7e234e468efb (patch)
treeb5ee4d2e795ca19bdc3ac2b4386073ae6c397d91 /main.go
parent14deea6c20288eb42082674527899f3d3f49c409 (diff)
Add missing PlaintextNames checks in OpenDir, Mkdir, Rmdir, initDir
Plaintextnames support has bitrotted during the DirIV additions, this needs test cases. Will be added in a future patch. Fixes issue #9.
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")