fixed errorneous error handling

This commit is contained in:
Fufu Fang 2021-08-21 02:40:20 +01:00
parent 33bbd21e9f
commit 89df992053
No known key found for this signature in database
GPG Key ID: 0F6BB5EF6F8BB729
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
/** /**
* \brief error associated with metadata * \brief error associated with metadata
*/ */
@ -62,7 +63,7 @@ static char *CacheSystem_calc_dir(const char *url)
char *fn = path_append(cache_dir_root, "/CACHEDIR.TAG"); char *fn = path_append(cache_dir_root, "/CACHEDIR.TAG");
FILE *fp = fopen(fn, "w"); FILE *fp = fopen(fn, "w");
if (fn) { if (fp) {
fprintf(fp, fprintf(fp,
"Signature: 8a477f597d28d172789f06886806bc55\n\ "Signature: 8a477f597d28d172789f06886806bc55\n\
# This file is a cache directory tag created by httpdirfs.\n\ # This file is a cache directory tag created by httpdirfs.\n\