lesser changes

This commit is contained in:
Matteo Paonessa 2015-05-10 19:51:50 +02:00
parent 0943a8d46c
commit 877fe44720
1 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,14 @@ int cclt_optimize(char* input_file, char* output_file) {
//We don't need the input file anymore
fclose(fp);
//Create the output path if does not exists
if (mkdir(pars.output_folder, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == -1) {
if (errno != EEXIST) {
perror("mkdir");
exit(-5);
}
}
//Open the output one instead
fp = fopen(output_file, "w+");