summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChing Pei Yang <badnam3o.0@gmail.com>2024-01-07 02:37:12 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-02-18 15:36:56 +0100
commit7cef4f4e3323aa26dd3a0a4b2d60fc1bf552eb14 (patch)
tree71a3ac0c6b849fb49d0af00ba346380f7612fcb2
parent2c0520bc4bb34e40ab4b52a8178e62b7ae609f60 (diff)
Change log path to state dir
-rw-r--r--pkg/config/app_config.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go
index b9b3eed2c..67852dcd1 100644
--- a/pkg/config/app_config.go
+++ b/pkg/config/app_config.go
@@ -243,15 +243,6 @@ func (c *AppConfig) GetTempDir() string {
return c.TempDir
}
-func configFilePath(filename string) (string, error) {
- exists, path := findConfigFile(filename)
-
- if exists {
- return path, nil
- }
- return path, os.MkdirAll(filepath.Dir(path), 0o755)
-}
-
// findConfigFile looks for a possibly existing config file.
// This function does NOT create any folders or files.
func findConfigFile(filename string) (exists bool, path string) {
@@ -389,5 +380,5 @@ func LogPath() (string, error) {
return os.Getenv("LAZYGIT_LOG_PATH"), nil
}
- return configFilePath("development.log")
+ return stateFilePath("development.log")
}