Fix path separators

And add all binaries to gitignore
This commit is contained in:
Brian Buller 2018-07-30 15:46:44 -05:00
parent 95acb78140
commit 59fa2ca1ee
2 changed files with 7 additions and 4 deletions

5
.gitignore vendored
View File

@ -24,5 +24,8 @@ _testmain.go
*.test
*.prof
# Ignore the binary
# Ignore the binaries
gime
gime.darwin64*
gime.linux64*
gime.win64.exe*

View File

@ -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":