diff --git a/mcopy.cpp b/mcopy.cpp index 4cb42c0..3f45d88 100644 --- a/mcopy.cpp +++ b/mcopy.cpp @@ -157,11 +157,19 @@ int main(int argc, char **argv) { exit(1); } + int set{0}; + for (int i{1}; i < ac; i++) { std::ifstream f(av[i]); if (static_cast(f.good())) { + set = 1; getMetadataFromFile(format, av[i]); } } + + if (!set) { + std::cout << "mcopy: File not found.\n"; + exit(1); + } }