Browse Source

update

pull/103/head
Unknown 12 years ago
parent
commit
9d54467f4a
  1. 4
      gpm.go

4
gpm.go

@ -114,14 +114,16 @@ func getAppPath() bool {
// Look up executable in PATH variable.
appPath, _ = exec.LookPath(path.Base(os.Args[0]))
// Check if run under $GOPATH/bin
if len(appPath) == 0 {
fmt.Printf("ERROR: getAppPath -> Unable to indicate current execute path.\n")
return false
}
appPath += "/"
if runtime.GOOS == "windows" {
// Replace all '\' to '/'.
appPath = strings.Replace(filepath.Dir(appPath), "\\", "/", -1) + "/"
appPath = strings.Replace(filepath.Dir(appPath), "\\", "/", -1)
}
doc.SetAppConfig(appPath, config.AutoBackup)

Loading…
Cancel
Save