aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 8bbb052..750475b 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,7 +1,11 @@
use inotify::{EventMask, Inotify, WatchMask};
use log::{error, info};
use serde::{Deserialize, Serialize};
-use std::{fs::read_to_string, net::SocketAddr, sync::{Arc, RwLock}};
+use std::{
+ fs::read_to_string,
+ net::SocketAddr,
+ sync::{Arc, RwLock},
+};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Config {
@@ -21,7 +25,8 @@ pub fn watch(config: Arc<RwLock<Arc<Config>>>) {
std::thread::spawn(move || {
let mut inotify = Inotify::init().unwrap();
inotify
- .add_watch(
+ .watches()
+ .add(
".",
WatchMask::MODIFY | WatchMask::CREATE | WatchMask::DELETE,
)