delete a leftover dioxusin file on all unix operating systems, not just mac
This commit is contained in:
1 parent
ab79c00cd8
commit
15dff7ad55
2 files changed
+2
-2
No files matched your search
@@ -185,7 +185,7 @@ async fn start_desktop_hot_reload(hot_reload_state: HotReloadState) -> Result<()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn clear_paths(file_socket_path: &std::path::Path) {
|
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
|
// 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
|
// 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
|
// We check if the file socket is already open from an old session and then delete it
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ pub fn init<Ctx: HotReloadingContext + Send + 'static>(cfg: Config<Ctx>) {
|
|||||||
let target_dir = crate_dir.join("target");
|
let target_dir = crate_dir.join("target");
|
||||||
let hot_reload_socket_path = target_dir.join("dioxusin");
|
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
|
// 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
|
// This will cause the local socket listener to fail to open
|
||||||
|
|||||||
Reference in new issue
Block a user