|
|
@@ -8,7 +8,7 @@ use tokio::stream::StreamExt;
|
|
8
|
8
|
use tokio::sync::{mpsc, Mutex};
|
|
9
|
9
|
use tokio::signal;
|
|
10
|
10
|
|
|
11
|
|
-use twfss::{Database, FileTree, ClientSideSync, FileSystemWatcher, Error, SynchronizationError};
|
|
|
11
|
+use twfss::{Database, FileTree, ClientSideSync, FileSystemWatcher, Error, SynchronizationError, paths};
|
|
12
|
12
|
|
|
13
|
13
|
mod cli;
|
|
14
|
14
|
|
|
|
@@ -75,7 +75,7 @@ async fn main() {
|
|
75
|
75
|
|
|
76
|
76
|
// We create the socket before starting synchronization, so that the unwrap() below does not
|
|
77
|
77
|
// cause corruption.
|
|
78
|
|
- let mut listener = UnixListener::bind(cli::socket_path()).unwrap();
|
|
|
78
|
+ let mut listener = UnixListener::bind(paths::client_socket()).unwrap();
|
|
79
|
79
|
let mut incoming = listener.incoming();
|
|
80
|
80
|
|
|
81
|
81
|
// Initialize the existing synchronized directories.
|
|
|
@@ -92,6 +92,7 @@ async fn main() {
|
|
92
|
92
|
tokio::select! {
|
|
93
|
93
|
result = &mut ctrl_c => {
|
|
94
|
94
|
result.expect("could not listen for Ctrl+C");
|
|
|
95
|
+ println!("Ctrl+C pressed, terminating...");
|
|
95
|
96
|
// Ctrl+C was pressed, so we terminate the program.
|
|
96
|
97
|
break;
|
|
97
|
98
|
}
|