Merge pull request #665 from fukusuket/fix-f-option-file-exists-check

fix: add file existing check when -f option specified. issue #664
This commit is contained in:
DustInDark
2022-08-19 05:16:06 +09:00
committed by GitHub
+8
View File
@@ -213,6 +213,14 @@ impl App {
}
self.analysis_files(live_analysis_list.unwrap(), &time_filter);
} else if let Some(filepath) = &configs::CONFIG.read().unwrap().args.filepath {
if !filepath.exists() {
AlertMessage::alert(&format!(
" The file {} does not exist. Please specify a valid file path.",
filepath.as_os_str().to_str().unwrap()
))
.ok();
return;
}
if !TARGET_EXTENSIONS.contains(
filepath
.extension()