Add an explicit error message for files that can't be opened
This commit is contained in:
parent
134ca73909
commit
37dc1f9b07
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -506,7 +507,12 @@ int main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
std::ifstream fin(arg.c_str());
|
||||||
|
if (fin) {
|
||||||
file_names.push_back(arg);
|
file_names.push_back(arg);
|
||||||
|
} else {
|
||||||
|
std::cerr << "Can't open file (permission?): " << arg << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue