diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-22 13:06:33 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-22 13:06:33 +0200 |
commit | d08051a8bc584988530922aea02dcd0098e40d9a (patch) | |
tree | e0d0ed39f2003e84375c8f47c3bd880a7d6a6efc /src/config.rs | |
parent | 6e50a340ca698ed94c11cfb156e3f5e498807e4d (diff) | |
download | trash-proxy-d08051a8bc584988530922aea02dcd0098e40d9a.tar trash-proxy-d08051a8bc584988530922aea02dcd0098e40d9a.tar.bz2 trash-proxy-d08051a8bc584988530922aea02dcd0098e40d9a.tar.zst |
update all the stuff
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 9 |
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, ) |