aboutsummaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-20 10:57:26 +0200
committerJakob Unterwurzacher2021-08-20 10:58:42 +0200
commit195d9d18a90d88ff2cb0530d832c59d98934fd1f (patch)
treee226de2355cfdf3f2d3a26411b85a338f2a264ef /init_dir.go
parent8f94083a2114c3aef4bc0320065e0374c420ea4a (diff)
Implement -deterministic-names: extended -zerodiriv
-deterministc-names uses all-zero dirivs but does not write them to disk anymore.
Diffstat (limited to 'init_dir.go')
-rw-r--r--init_dir.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/init_dir.go b/init_dir.go
index ce5f98d..cea7e53 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -99,11 +99,11 @@ func initDir(args *argContainer) {
}
// Forward mode with filename encryption enabled needs a gocryptfs.diriv file
// in the root dir
- if !args.plaintextnames && !args.reverse {
+ if !args.plaintextnames && !args.reverse && !args.deterministic_names {
// Open cipherdir (following symlinks)
dirfd, err := syscall.Open(args.cipherdir, syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
if err == nil {
- err = nametransform.WriteDirIVAt(dirfd, !args.zerodiriv)
+ err = nametransform.WriteDirIVAt(dirfd)
syscall.Close(dirfd)
}
if err != nil {