From 3edefccd0bdc997f25ecb14c6a984f1b3166d613 Mon Sep 17 00:00:00 2001 From: akanyan Date: Thu, 22 May 2025 10:52:57 +0000 Subject: [PATCH] fix: add aime.txt check to the importer --- rust/src/modules/segatools.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/src/modules/segatools.rs b/rust/src/modules/segatools.rs index eee822e..83be729 100644 --- a/rust/src/modules/segatools.rs +++ b/rust/src/modules/segatools.rs @@ -43,7 +43,11 @@ impl Segatools { if let Some(aime_path) = s.get("aimePath") { if let Some(game_dir) = self.target.parent() { let target = game_dir.join(aime_path); - std::fs::copy(target, config_dir.as_ref().join("aime.txt"))?; + if target.exists() { + std::fs::copy(target, config_dir.as_ref().join("aime.txt"))?; + } else { + log::warn!("aime.txt was configured in segatools.ini but it doesn't exist"); + } } else { log::error!("profile doesn't have a game directory"); }