From d718d0c46efe14070ae9bc1985ba43768bd56d54 Mon Sep 17 00:00:00 2001 From: mindfreq <144544047+mindfreq@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:20:08 +0200 Subject: [PATCH] fix/update --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0d8fa10..3ce3528 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,9 +16,10 @@ fn main() { fn run(args: Vec) -> Result<(), Box> { let config = Config::build(args)?; let file_path = &config.file_path; - // if !std::path::Path::new(&file_path).exists() { - // return Err("File not exists!"); - // } + + if !std::path::Path::new(&file_path).exists() { + return Err("File not exists!".into()); + } let mut file = std::fs::File::open(file_path).map_err(|_| "Failed to open file")?; let mut file_content = String::new();