소스 검색

Fix default configuration file not created on startup

ayntgl 3 년 전
부모
커밋
3be62dace0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      config/config.go

+ 2 - 1
config/config.go

@@ -103,7 +103,8 @@ func (cfg *Config) Load() error {
 
 func (cfg *Config) configPath() string {
 	path, _ := os.UserConfigDir()
+	path = filepath.Join(path, Name)
 	// Create the configuration directory if it does not exist already.
-	_ = os.MkdirAll(filepath.Join(path, Name), os.ModePerm)
+	_ = os.MkdirAll(path, os.ModePerm)
 	return filepath.Join(path, "config.yml")
 }