diff options
Diffstat (limited to 'src/cli/Main.cpp')
-rw-r--r-- | src/cli/Main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cli/Main.cpp b/src/cli/Main.cpp index 88ec6b9..d03735d 100644 --- a/src/cli/Main.cpp +++ b/src/cli/Main.cpp @@ -171,6 +171,14 @@ int main(int argc, char **argv) logger.error("Currently no reading from std::in is supported!"); return ERROR_IN_COMMAND_LINE; } else { + if (!fs::exists(inputPath)) { + logger.error("Input file \"" + inputPath + "\" does not exist"); + return ERROR_IN_COMMAND_LINE; + } + if (!fs::is_regular_file(inputPath)) { + logger.error("Input file \"" + inputPath + "\" is not a regular file"); + return ERROR_IN_COMMAND_LINE; + } inputPath = fs::canonical(inputPath).string(); } |