mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Dont use non-writeable locations containing kitty.conf as the config dir
This commit is contained in:
@@ -102,8 +102,10 @@ func ConfigDirForName(name string) (config_dir string) {
|
|||||||
if loc != "" {
|
if loc != "" {
|
||||||
q := filepath.Join(loc, "kitty")
|
q := filepath.Join(loc, "kitty")
|
||||||
if _, err := os.Stat(filepath.Join(q, name)); err == nil {
|
if _, err := os.Stat(filepath.Join(q, name)); err == nil {
|
||||||
config_dir = q
|
if unix.Access(q, unix.W_OK) == nil {
|
||||||
return
|
config_dir = q
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user