From 15dff7ad55388e90f057a1b90d372facf8927ce7 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sat, 30 Dec 2023 11:58:09 -0600 Subject: [PATCH] delete a leftover dioxusin file on all unix operating systems, not just mac --- packages/cli/src/server/desktop/mod.rs | 2 +- packages/hot-reload/src/file_watcher.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/server/desktop/mod.rs b/packages/cli/src/server/desktop/mod.rs index 4051f2199..34f85a312 100644 --- a/packages/cli/src/server/desktop/mod.rs +++ b/packages/cli/src/server/desktop/mod.rs @@ -185,7 +185,7 @@ async fn start_desktop_hot_reload(hot_reload_state: HotReloadState) -> Result<() } fn clear_paths(file_socket_path: &std::path::Path) { - if cfg!(target_os = "macos") { + if cfg!(unix) { // On unix, if you force quit the application, it can leave the file socket open // This will cause the local socket listener to fail to open // We check if the file socket is already open from an old session and then delete it diff --git a/packages/hot-reload/src/file_watcher.rs b/packages/hot-reload/src/file_watcher.rs index 0323561fe..b3be7de11 100644 --- a/packages/hot-reload/src/file_watcher.rs +++ b/packages/hot-reload/src/file_watcher.rs @@ -155,7 +155,7 @@ pub fn init(cfg: Config) { let target_dir = crate_dir.join("target"); let hot_reload_socket_path = target_dir.join("dioxusin"); - #[cfg(target_os = "macos")] + #[cfg(unix)] { // On unix, if you force quit the application, it can leave the file socket open // This will cause the local socket listener to fail to open