mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-06-15 12:54:48 +03:00
Compare commits
1 Commits
v0.11.0
...
main-dbeae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbeaea03ad |
@@ -1,6 +1,7 @@
|
||||
use crate::capture_test::TestCaptureArgs;
|
||||
use crate::emulation_test::TestEmulationArgs;
|
||||
use clap::{Parser, Subcommand, ValueEnum};
|
||||
use notify::event::ModifyKind;
|
||||
use notify::{EventKind, RecommendedWatcher, Watcher};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
@@ -406,7 +407,9 @@ impl Config {
|
||||
if event.paths.contains(&self.config_path)
|
||||
&& matches!(
|
||||
event.kind,
|
||||
EventKind::Create(_) | EventKind::Modify(_) | EventKind::Remove(_)
|
||||
EventKind::Create(_)
|
||||
| EventKind::Modify(ModifyKind::Data(_))
|
||||
| EventKind::Remove(_)
|
||||
)
|
||||
&& self.read_from_disk()?
|
||||
{
|
||||
@@ -524,6 +527,11 @@ impl Config {
|
||||
}
|
||||
Err(e) => log::warn!("{:?} {e}", self.config_path()),
|
||||
};
|
||||
if changed {
|
||||
log::info!("config changed");
|
||||
} else {
|
||||
log::info!("config unchanged");
|
||||
}
|
||||
Ok(changed)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user