mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Add a test for creation of anonymous tempfiles
This commit is contained in:
parent
4185e30d73
commit
eb50fac8de
2 changed files with 31 additions and 1 deletions
|
|
@ -24,7 +24,11 @@ func CreateAnonymousTemp(dir string) (*os.File, error) {
|
|||
return os.NewFile(uintptr(fd), path), nil
|
||||
}
|
||||
if err == unix.ENOENT {
|
||||
return nil, err
|
||||
return nil, &os.PathError{
|
||||
Op: "open",
|
||||
Path: dir,
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
f, err := os.CreateTemp(dir, "")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue