Files
cow/config_windows.go
Chen Yufei f1fd6afbe1 Implement #328, allow specifying stat/blocked etc. in config file.
Also load stat/blocked/direct default from directory containing config file.
2015-06-03 00:41:34 +08:00

22 lines
445 B
Go

package main
import (
"os"
"path"
)
const (
rcFname = "rc.txt"
blockedFname = "blocked.txt"
directFname = "direct.txt"
statFname = "stat.txt"
newLine = "\r\n"
)
func getDefaultRcFile() string {
// On windows, put the configuration file in the same directory of cow executable
// This is not a reliable way to detect binary directory, but it works for double click and run
return path.Join(path.Dir(os.Args[0]), rcFname)
}