mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Fix another incorrect use of unix.Stat_t
This commit is contained in:
parent
8e4050b923
commit
3832e45a6f
1 changed files with 2 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/process"
|
||||
|
|
@ -163,7 +164,7 @@ func macos_user_cache_dir() string {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
stat, ok := s.Sys().(unix.Stat_t)
|
||||
stat, ok := s.Sys().(syscall.Stat_t)
|
||||
return ok && s.IsDir() && int(stat.Uid) == os.Geteuid() && s.Mode().Perm() == 0o700 && unix.Access(m, unix.X_OK|unix.W_OK|unix.R_OK) == nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue