-fixes
[oweals/gnunet.git] / src / fs / gnunet-directory.c
index adb071e8df83c7ee6a1b5cc9d18a07301861c4af..0721ea90e8af956796f1da15fe92d44f1d0b9fa6 100644 (file)
@@ -129,7 +129,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 
   if (NULL == args[0])
   {
-    FPRINTF (stderr, "%s",  _("You must specify a filename to inspect."));
+    FPRINTF (stderr, "%s",  _("You must specify a filename to inspect.\n"));
     ret = 1;
     return;
   }
@@ -150,8 +150,11 @@ run (void *cls, char *const *args, const char *cfgfile,
     len = (size_t) size;
     data = GNUNET_DISK_file_map (h, &map, GNUNET_DISK_MAP_TYPE_READ, len);
     GNUNET_assert (NULL != data);
-    GNUNET_FS_directory_list_contents (len, data, 0, &print_entry, NULL);
-    printf ("\n");
+    if (GNUNET_OK != GNUNET_FS_directory_list_contents (len, data, 0, &print_entry, NULL))
+      fprintf (stdout, _("`%s' is not a GNUnet directory\n"),
+              filename);
+    else
+      printf ("\n");
     GNUNET_DISK_file_unmap (map);
     GNUNET_DISK_file_close (h);
   }