main: init: handle spaces in mount suggestion message

	You can now mount it using: gocryptfs a x MOUNTPOINT

	You can now mount it using: gocryptfs "a x" MOUNTPOINT

This is still not bulletproof but should handle the common
case of having a space in the directory name. After all,
it's only a suggestion.
This commit is contained in:
Jakob Unterwurzacher 2016-10-09 18:27:03 +02:00
parent 495479dc66
commit 17df345103
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ func initDir(args *argContainer) {
// keep the absolute path.
friendlyPath = args.cipherdir
if strings.Contains(friendlyPath, " ") {
friendlyPath = "\"" + friendlyPath + "\""
tlog.Info.Printf(tlog.ColorGrey+"You can now mount it using: %s%s %s MOUNTPOINT"+tlog.ColorReset,
tlog.ProgramName, mountArgs, friendlyPath)