mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 15:55:25 +03:00
pass empty string into ioutil.TempDir
TempDir uses the default directory for temporary files if dir is empty
This commit is contained in:
parent
374ea255ec
commit
88b798517d
2
main.go
2
main.go
@ -42,7 +42,7 @@ func (n *PhiEditor) init(cfg *cfg.TomlConfig) {
|
||||
}
|
||||
} else {
|
||||
// we have no args, open up a scratch file
|
||||
tempFile, err := ioutil.TempFile("/var/tmp/", "phi-editor-")
|
||||
tempFile, err := ioutil.TempFile("", "phi-editor-")
|
||||
if err != nil {
|
||||
log.Println("Failed to create temp file", err.Error())
|
||||
os.Exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user