summaryrefslogtreecommitdiff
path: root/init_dir.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-03-03 13:25:30 +0100
committerJakob Unterwurzacher2019-03-03 13:25:30 +0100
commitcf27037f20723e934320edeff7f8aa356bdca467 (patch)
treeb12428d172325fcfb517af26f7985651ef70e902 /init_dir.go
parent61940a9c0666eba8be21de4f1cd182912f74f929 (diff)
Allow multiple -extpass arguments
To support arguments containing spaces, -extpass can now be passed multiple times. https://github.com/rfjakob/gocryptfs/issues/289
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 ecfec9d..c3aa4b5 100644
--- a/init_dir.go
+++ b/init_dir.go
@@ -68,7 +68,7 @@ func initDir(args *argContainer) {
}
}
// Choose password for config file
- if args.extpass == "" {
+ if args.extpass.Empty() {
tlog.Info.Printf("Choose a password for protecting your files.")
}
{
@@ -80,7 +80,7 @@ func initDir(args *argContainer) {
password = readpassword.Trezor(trezorPayload)
} else {
// Normal password entry
- password = readpassword.Twice(args.extpass, args.passfile)
+ password = readpassword.Twice([]string(args.extpass), args.passfile)
readpassword.CheckTrailingGarbage()
}
creator := tlog.ProgramName + " " + GitVersion