mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-09 15:48:04 +03:00
fix: create ~/.config/lan-mouse/ on first launch
notify::Watcher fails on macOS if the config directory doesn't exist. Create it with create_dir_all before calling config.watch(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Ferdinand Schober
parent
f858a7de00
commit
c40e10505b
@@ -362,6 +362,11 @@ impl Config {
|
|||||||
.parent()
|
.parent()
|
||||||
.expect("config directory")
|
.expect("config directory")
|
||||||
.to_path_buf();
|
.to_path_buf();
|
||||||
|
// notify::Watcher requires the directory to exist on macOS (FSEvents)
|
||||||
|
// and some Linux backends. Create it eagerly so a first launch on a
|
||||||
|
// fresh machine — where ~/.config/lan-mouse/ has never been touched —
|
||||||
|
// doesn't surface as a notify::Error out of Config::new().
|
||||||
|
fs::create_dir_all(&config_dir)?;
|
||||||
let mut config = Config {
|
let mut config = Config {
|
||||||
args,
|
args,
|
||||||
cert_path,
|
cert_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user