Skip to content

Commit

Permalink
fix: remove redundant permission requirements (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed May 6, 2023
1 parent 9479b9a commit 18262a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/config_watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ async fn config_watcher(
} else {
env::current_dir()?.join(path)
};
let parent_path = path.parent().expect("config file should have a parent dir");
let path_clone = path.clone();
let mut watcher =
notify::recommended_watcher(move |res: Result<notify::Event, _>| match res {
Expand All @@ -162,7 +161,7 @@ async fn config_watcher(
Err(e) => error!("watch error: {:#}", e),
})?;

watcher.watch(parent_path, RecursiveMode::NonRecursive)?;
watcher.watch(path.as_path(), RecursiveMode::NonRecursive)?;
info!("Start watching the config");

loop {
Expand Down

0 comments on commit 18262a2

Please sign in to comment.