aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_directory.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-02-06 08:56:23 +0000
committerChristian Grothoff <christian@grothoff.org>2014-02-06 08:56:23 +0000
commit3aee4f36391c726bffa0d4dd3c97bc1e3dc663b7 (patch)
tree1842030cfcad0e6f443a1f5aeb7ecd2aeda12a25 /src/fs/fs_directory.c
parent44bb5a6082b7f240458abf8b39154cf0d4f06c45 (diff)
downloadgnunet-3aee4f36391c726bffa0d4dd3c97bc1e3dc663b7.tar.gz
gnunet-3aee4f36391c726bffa0d4dd3c97bc1e3dc663b7.zip
-doxygen, indentation, code cleanup
Diffstat (limited to 'src/fs/fs_directory.c')
-rw-r--r--src/fs/fs_directory.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c
index 3f7cc45c1..3c5e5a410 100644
--- a/src/fs/fs_directory.c
+++ b/src/fs/fs_directory.c
@@ -47,23 +47,21 @@
47 * Does the meta-data claim that this is a directory? 47 * Does the meta-data claim that this is a directory?
48 * Checks if the mime-type is that of a GNUnet directory. 48 * Checks if the mime-type is that of a GNUnet directory.
49 * 49 *
50 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if 50 * @return #GNUNET_YES if it is, #GNUNET_NO if it is not, #GNUNET_SYSERR if
51 * we have no mime-type information (treat as 'GNUNET_NO') 51 * we have no mime-type information (treat as #GNUNET_NO)
52 */ 52 */
53int 53int
54GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData 54GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData *md)
55 *md)
56{ 55{
57 char *mime; 56 char *mime;
58 int ret; 57 int ret;
59 58
60 if (NULL == md) 59 if (NULL == md)
61 return GNUNET_SYSERR; 60 return GNUNET_SYSERR;
62 mime = 61 mime = GNUNET_CONTAINER_meta_data_get_by_type (md, EXTRACTOR_METATYPE_MIMETYPE);
63 GNUNET_CONTAINER_meta_data_get_by_type (md, EXTRACTOR_METATYPE_MIMETYPE); 62 if (NULL == mime)
64 if (mime == NULL)
65 return GNUNET_SYSERR; 63 return GNUNET_SYSERR;
66 ret = (0 == strcmp (mime, GNUNET_FS_DIRECTORY_MIME)) ? GNUNET_YES : GNUNET_NO; 64 ret = (0 == strcasecmp (mime, GNUNET_FS_DIRECTORY_MIME)) ? GNUNET_YES : GNUNET_NO;
67 GNUNET_free (mime); 65 GNUNET_free (mime);
68 return ret; 66 return ret;
69} 67}