1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-08 22:36:49 +02:00

Change log path to state dir

This commit is contained in:
Ching Pei Yang
2024-01-07 02:37:12 +01:00
committed by Stefan Haller
parent 2c0520bc4b
commit 7cef4f4e33

View File

@ -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")
}