Added debug output for file storage
Signed-off-by: tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
parent
70128ba907
commit
8d75c009ab
1 changed files with 5 additions and 0 deletions
|
@ -128,6 +128,7 @@ int base64_decode_file(const char* directory, const struct email_t* mail){
|
||||||
}
|
}
|
||||||
if(exists){
|
if(exists){
|
||||||
/* What?*/
|
/* What?*/
|
||||||
|
fprintf(stderr,"Failed to create unique file name!\n");
|
||||||
free(filename);
|
free(filename);
|
||||||
free(decoded);
|
free(decoded);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -140,6 +141,10 @@ int base64_decode_file(const char* directory, const struct email_t* mail){
|
||||||
free(decoded);
|
free(decoded);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if(verbose){
|
||||||
|
printf("Storing base64 file len %lu top [%s]\n",
|
||||||
|
dec_len, decoded);
|
||||||
|
}
|
||||||
|
|
||||||
fwrite(decoded, dec_len, 1, outfile);
|
fwrite(decoded, dec_len, 1, outfile);
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
|
|
Loading…
Reference in a new issue