Commit 8337978f authored by Chris Waterson's avatar Chris Waterson Committed by GitHub
Browse files

Merge pull request #1107 from vmarkovtsev/patch-4

Swivel: fastprep: try to create the missing directory
parents bd7e850a e26a6daa
...@@ -603,10 +603,11 @@ int main(int argc, char *argv[]) { ...@@ -603,10 +603,11 @@ int main(int argc, char *argv[]) {
struct stat sb; struct stat sb;
if (lstat(output_dirname.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode)) { if (lstat(output_dirname.c_str(), &sb) != 0 || !S_ISDIR(sb.st_mode)) {
std::cerr << "output directory '" << output_dirname if (mkdir(output_dirname.c_str(), 0755) != 0) {
<< "' does not exist of is not a directory." << std::endl; std::cerr << "output directory '" << output_dirname
<< "' does not exist or is not a directory." << std::endl;
return 1; return 1;
}
} }
if (lstat(input_filename.c_str(), &sb) != 0 || !S_ISREG(sb.st_mode)) { if (lstat(input_filename.c_str(), &sb) != 0 || !S_ISREG(sb.st_mode)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment