mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Create temp directories inside a "lazygit" folder rather than top-level in /tmp
This is no longer as important now that we fixed the stale, left-over temp dirs caused by daemon mode, but it could still be helpful in case lazygit crashes, or if you have many instances of lazygit running.
This commit is contained in:
@ -124,7 +124,11 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
tempDir, err := os.MkdirTemp("", "lazygit-*")
|
||||
tmpDirBase := filepath.Join(os.TempDir(), "lazygit")
|
||||
if err := os.MkdirAll(tmpDirBase, 0o700); err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
tempDir, err := os.MkdirTemp(tmpDirBase, "")
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user