-fix #2598
[oweals/gnunet.git] / src / fs / gnunet-directory.c
index a853e8899ea53c813cb53b5d075c7a51855e9b0c..4122cb154fcb8cc5a4a876d5f1dd3222df0747fe 100644 (file)
@@ -129,14 +129,14 @@ 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;
   }
   i = 0;
   while (NULL != (filename = args[i++]))
   {
-    if ((GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES)) ||
+    if ((GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES, GNUNET_YES)) ||
         (NULL ==
          (h =
           GNUNET_DISK_file_open (filename, GNUNET_DISK_OPEN_READ,
@@ -173,6 +173,10 @@ main (int argc, char *const *argv)
   static struct GNUNET_GETOPT_CommandLineOption options[] = {
     GNUNET_GETOPT_OPTION_END
   };
+
+  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+    return 2;
+
   return (GNUNET_OK ==
           GNUNET_PROGRAM_run (argc, argv, "gnunet-directory [OPTIONS] FILENAME",
                               gettext_noop