diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-18 21:37:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-18 21:37:48 +0000 |
commit | 01c0d4c4f48eb02440c357f0e989d8dd8acb7a58 (patch) | |
tree | 707359d031978cb2744e51bada01ae1140bc8911 /src | |
parent | 6a30eb236afd1612533f6ab762f9d76fea059afd (diff) |
-do not try to desearialize search directories
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/fs_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index cae2c693dc..b930f35bdd 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -2641,7 +2641,15 @@ deserialize_search_file (void *cls, const char *filename) char *emsg; struct GNUNET_BIO_ReadHandle *rh; struct GNUNET_FS_SearchContext *sc; + struct stat buf; + if (0 != STAT (filename, &buf)) + { + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "stat", filename); + return GNUNET_OK; + } + if (S_ISDIR (buf.st_mode)) + return GNUNET_OK; /* skip directories */ ser = get_serialization_short_name (filename); rh = GNUNET_BIO_read_open (filename); if (rh == NULL) |