Skip to content

Commit 0c0cc70

Browse files
authored
Merge pull request #47 from mahmudhera/main
skip dir creation, removes a bug introduced by 0c50127
2 parents 4b93e9e + bb94326 commit 0c0cc70

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/compare.cpp

-13
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,6 @@ void do_compare(Arguments& args) {
100100
}
101101
}
102102

103-
// create the directory of output file if it does not exist
104-
string output_dir = args.output_filename.substr(0, args.output_filename.find_last_of("/"));
105-
struct stat info;
106-
if (stat(output_dir.c_str(), &info) != 0) {
107-
cout << "The directory " << output_dir << " does not exist. Creating..." << endl;
108-
// create the directory
109-
string create_dir_command = "mkdir -p " + output_dir;
110-
if (system(create_dir_command.c_str()) != 0) {
111-
cerr << "Error in creating the directory " << output_dir << endl;
112-
exit(1);
113-
}
114-
}
115-
116103
// write the header in the output file
117104
ofstream output_file(args.output_filename);
118105
if (!output_file.is_open()) {

0 commit comments

Comments
 (0)