From 59fa2ca1eeae2a8b70214f8fc6f3e19b5bd3f488 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Mon, 30 Jul 2018 15:46:44 -0500 Subject: [PATCH] Fix path separators And add all binaries to gitignore --- .gitignore | 5 ++++- main.go | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index dfc382e..ef61531 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,8 @@ _testmain.go *.test *.prof -# Ignore the binary +# Ignore the binaries gime +gime.darwin64* +gime.linux64* +gime.win64.exe* diff --git a/main.go b/main.go index a66f60e..430b097 100644 --- a/main.go +++ b/main.go @@ -83,7 +83,7 @@ func cmdDoConfig(args []string) int { conf = strings.TrimSpace(conf) if conf == "Y" { fmt.Println("Resetting Configuration...") - cfg.Set("dbdir", cfg.GetConfigPath()+"/") + cfg.Set("dbdir", cfg.GetConfigPath()+string(os.PathSeparator)) cfg.Set("dbname", DefDBName) cfg.Set("dbarchname", DefArchDBName) cfg.Set("roundto", DefRoundTo) @@ -107,8 +107,8 @@ func cmdDoConfig(args []string) int { switch pts[0] { case "dbdir": val := pts[1] - if val[len(val)-1] != '/' { - val = val + "/" + if val[len(val)-1] != os.PathSeparator { + val = val + string(os.PathSeparator) } cfg.Set("dbdir", val) case "dbname":