"git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "a449d312c3b9ac5b1ebb13cba2e49b353e0f00d4"
Commit e26a6daa authored by Vadim Markovtsev's avatar Vadim Markovtsev
Browse files

Swivel: fastprep: try to create the missing directory

parent 89bccc63
...@@ -590,11 +590,12 @@ int main(int argc, char *argv[]) { ...@@ -590,11 +590,12 @@ 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)) {
if (mkdir(output_dirname.c_str(), 0755) != 0) {
std::cerr << "output directory '" << output_dirname std::cerr << "output directory '" << output_dirname
<< "' does not exist of is not a directory." << std::endl; << "' 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)) {
std::cerr << "input file '" << input_filename std::cerr << "input file '" << input_filename
......
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