diff --git a/src/main/cpp/tiv.cpp b/src/main/cpp/tiv.cpp index bafdd0d..2c9074a 100644 --- a/src/main/cpp/tiv.cpp +++ b/src/main/cpp/tiv.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -506,7 +507,12 @@ int main(int argc, char* argv[]) { } } } else { - file_names.push_back(arg); + std::ifstream fin(arg.c_str()); + if (fin) { + file_names.push_back(arg); + } else { + std::cerr << "Can't open file (permission?): " << arg << std::endl; + } } } }