summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 721dd0f0f7..4932f51a68 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -500,7 +500,11 @@ func DateLang(lang string) string {
// execPath returns the executable path.
func execPath() (string, error) {
- file, err := exec.LookPath(os.Args[0])
+ execFile := os.Args[0]
+ if IsWindows && filepath.IsAbs(execFile) {
+ return filepath.Clean(execFile), nil
+ }
+ file, err := exec.LookPath(execFile)
if err != nil {
return "", err
}