diff options
author | Jakob Unterwurzacher | 2015-12-10 01:12:05 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-12-10 01:12:05 +0100 |
commit | ccf6d00728a8cb107ae2a829f89e7e234e468efb (patch) | |
tree | b5ee4d2e795ca19bdc3ac2b4386073ae6c397d91 /main.go | |
parent | 14deea6c20288eb42082674527899f3d3f49c409 (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.go | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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") |