From beece1157f9fd0006e39068b017dc0b3abdf0b60 Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Sat, 14 Oct 2023 10:02:08 +0800 Subject: [PATCH] chore: fix when config file is not exist --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 155d3df..4194cb3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,7 +134,9 @@ async fn main() -> anyhow::Result<()> { let config_path = std::path::Path::new(home.as_str()) .join(".config") .join("xdg-desktop-portal-luminous"); - async_watch(config_path, conn).await.unwrap() + if let Err(e) = async_watch(config_path, conn).await { + tracing::info!("Maybe file is not exist, error: {e}"); + } }); pending::<()>().await;