mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-10 01:51:09 +00:00
Fix conf watcher kitten not tracking changes to symlink targets
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Some checks are pending
CI / Linux (python=3.13 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.11 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
This commit is contained in:
parent
dd136ba806
commit
f2df2394ce
2 changed files with 12 additions and 3 deletions
|
|
@ -182,6 +182,8 @@ Detailed list of changes
|
|||
|
||||
- Fix a regression in the previous release that broke automatic color scheme changes when using a background image (:iss:`10058`)
|
||||
|
||||
- Fix :opt:`auto_reload_config` not working when :file:`kitty.conf` is a symlink (:iss:`10066`)
|
||||
|
||||
0.47.0 [2026-05-19]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,13 @@ func resolve_path(path string) string {
|
|||
return filepath.Clean(path)
|
||||
}
|
||||
|
||||
func safe_eval_symlinks(path string) string {
|
||||
if q, err := filepath.EvalSymlinks(path); err == nil {
|
||||
path = q
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
func get_set_of_config_files(config_paths []string) *utils.Set[string] {
|
||||
cp := config.ConfigParser{
|
||||
AllIncludedFiles: utils.NewSet[string](), LineHandler: func(k, v string) error { return nil }}
|
||||
|
|
@ -102,14 +109,14 @@ func get_set_of_config_files(config_paths []string) *utils.Set[string] {
|
|||
// where /tmp -> /private/tmp causes mismatches with FSEvents-reported paths).
|
||||
result := utils.NewSet[string](cp.AllIncludedFiles.Len() + len(config_paths)*4)
|
||||
for _, p := range cp.AllIncludedFiles.AsSlice() {
|
||||
result.Add(resolve_path(p))
|
||||
result.Add(safe_eval_symlinks(resolve_path(p)))
|
||||
}
|
||||
for _, path := range config_paths {
|
||||
path = resolve_path(path)
|
||||
result.Add(path)
|
||||
dir := filepath.Dir(path)
|
||||
result.Add(safe_eval_symlinks(path))
|
||||
for _, q := range []string{"dark-theme.auto.conf", "light-theme.auto.conf", "no-preference-theme.auto.conf"} {
|
||||
result.Add(resolve_path(filepath.Join(dir, q)))
|
||||
result.Add(safe_eval_symlinks(resolve_path(filepath.Join(dir, q))))
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue