From 3cf18ecf478b6a0cf47f6d9b78adb22aaf184c63 Mon Sep 17 00:00:00 2001 From: Tobi Date: Tue, 18 Feb 2025 22:25:18 +0100 Subject: [PATCH] feat: added ErrorKind::IsADirectory to --file-list (#21) --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index e6b471a..73784fd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,6 +93,10 @@ fn main() { eprintln!("The contents of {input_file_path} contain invalid data. Please make sure it is encoded as UTF-8."); exit(1); } + ErrorKind::IsADirectory => { + eprintln!("The path {input_file_path} is a directory."); + exit(1); + } _ => { eprintln!("An error has occurred reading the file at path {input_file_path}: {:?}.", err); exit(1);