diff options
author | Canop <cano.petrole@gmail.com> | 2021-06-04 15:49:26 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-06-04 15:49:26 +0200 |
commit | 686e6ee62dd647c0c5d5d99947d6b8e3299629f3 (patch) | |
tree | 4043802419ccae7f15f2c26037b5f13cfdf72478 /src/app | |
parent | a7f52d13c8cc8f92b5b7b606a4355b24d90ee7bb (diff) |
fix broken compilation when feature "client-server" is enabled
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app/app.rs b/src/app/app.rs index 4fb457d..0d75390 100644 --- a/src/app/app.rs +++ b/src/app/app.rs @@ -510,8 +510,10 @@ impl App { self.update_preview(con); #[cfg(feature="client-server")] - if let Ok(mut root) = self.root.lock() { // when does this not work ? - *root = self.state().selected_path().to_path_buf(); + if let Ok(mut root) = self.root.lock() { + if let Some(path) = self.state().selected_path() { + *root = path.to_path_buf(); + } } Ok(()) |