diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-09 13:39:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-09 13:39:17 +0000 |
commit | e59b32948cba58249c9b19e7426602dbe4f20d00 (patch) | |
tree | cae76c6cd4ce7a82d3566e14ee6e056442b34df7 /src | |
parent | 44fabc12da537bbe3c44eb3b150d8acabe505170 (diff) | |
download | gnunet-e59b32948cba58249c9b19e7426602dbe4f20d00.tar.gz gnunet-e59b32948cba58249c9b19e7426602dbe4f20d00.zip |
-fixing #2413
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/fs_api.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 86402048e..ec959433a 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -924,6 +924,7 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) | |||
924 | struct GNUNET_FS_FileInformation *ret; | 924 | struct GNUNET_FS_FileInformation *ret; |
925 | struct GNUNET_BIO_ReadHandle *rh; | 925 | struct GNUNET_BIO_ReadHandle *rh; |
926 | char *emsg; | 926 | char *emsg; |
927 | char *fn; | ||
927 | 928 | ||
928 | rh = get_read_handle (h, GNUNET_FS_SYNC_PATH_FILE_INFO, filename); | 929 | rh = get_read_handle (h, GNUNET_FS_SYNC_PATH_FILE_INFO, filename); |
929 | if (rh == NULL) | 930 | if (rh == NULL) |
@@ -938,8 +939,13 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) | |||
938 | } | 939 | } |
939 | if (ret == NULL) | 940 | if (ret == NULL) |
940 | { | 941 | { |
941 | if (0 != UNLINK (filename)) | 942 | fn = get_serialization_file_name (h, GNUNET_FS_SYNC_PATH_FILE_INFO, filename); |
942 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", filename); | 943 | if (NULL != fn) |
944 | { | ||
945 | if (0 != UNLINK (fn)) | ||
946 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); | ||
947 | GNUNET_free (fn); | ||
948 | } | ||
943 | } | 949 | } |
944 | return ret; | 950 | return ret; |
945 | } | 951 | } |