From 4c2b1be3a4bc0479927922f12b0c71b2404d073f Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Tue, 12 Sep 2017 15:27:44 +0300 Subject: Basic VSCode configuration for building and debugging (#2483) * Basic VSCode configuration for building and debugging * Fix building and debugging in Windows * Move to contrib folder and add instructions --- modules/setting/setting.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') 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 } -- cgit v1.2.3