aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-18 21:37:48 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-18 21:37:48 +0000
commit01c0d4c4f48eb02440c357f0e989d8dd8acb7a58 (patch)
tree707359d031978cb2744e51bada01ae1140bc8911 /src/fs/fs_api.c
parent6a30eb236afd1612533f6ab762f9d76fea059afd (diff)
downloadgnunet-01c0d4c4f48eb02440c357f0e989d8dd8acb7a58.tar.gz
gnunet-01c0d4c4f48eb02440c357f0e989d8dd8acb7a58.zip
-do not try to desearialize search directories
Diffstat (limited to 'src/fs/fs_api.c')
-rw-r--r--src/fs/fs_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index cae2c693d..b930f35bd 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)
2641 char *emsg; 2641 char *emsg;
2642 struct GNUNET_BIO_ReadHandle *rh; 2642 struct GNUNET_BIO_ReadHandle *rh;
2643 struct GNUNET_FS_SearchContext *sc; 2643 struct GNUNET_FS_SearchContext *sc;
2644 struct stat buf;
2644 2645
2646 if (0 != STAT (filename, &buf))
2647 {
2648 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "stat", filename);
2649 return GNUNET_OK;
2650 }
2651 if (S_ISDIR (buf.st_mode))
2652 return GNUNET_OK; /* skip directories */
2645 ser = get_serialization_short_name (filename); 2653 ser = get_serialization_short_name (filename);
2646 rh = GNUNET_BIO_read_open (filename); 2654 rh = GNUNET_BIO_read_open (filename);
2647 if (rh == NULL) 2655 if (rh == NULL)