From cf27037f20723e934320edeff7f8aa356bdca467 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 3 Mar 2019 13:25:30 +0100 Subject: Allow multiple -extpass arguments To support arguments containing spaces, -extpass can now be passed multiple times. https://github.com/rfjakob/gocryptfs/issues/289 --- init_dir.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init_dir.go') 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 -- cgit v1.2.3