1
Fork 0

Make file exists check if it is indeed a file too.

This commit is contained in:
Bauke 2023-11-07 17:19:19 +01:00
parent 115b99ee66
commit fea8ebc73a
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ pub fn run() {
command: file_subcommand,
} => match file_subcommand {
FileSubcommand::Exists { file } => {
if !file.exists() {
if !(file.exists() && file.is_file()) {
std::process::exit(1);
}
}