From 7cef4f4e3323aa26dd3a0a4b2d60fc1bf552eb14 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sun, 7 Jan 2024 02:37:12 +0100 Subject: Change log path to state dir --- pkg/config/app_config.go | 11 +---------- 1 file changed, 1 insertion(+), 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") } -- cgit v1.2.3