fix
[oweals/gnunet.git] / src / fs / gnunet-publish.c
index 18c4fd78e3c7eb2b36bbb13d97ae9dd9280aeea1..c8c486bd74fad8d8e44054504fc1410bf7eeb5bc 100644 (file)
@@ -395,6 +395,12 @@ run (void *cls,
   
   sched = s;
   /* check arguments */
+  if ((uri_string != NULL) && (extract_only))
+    {
+      printf (_("Cannot extract metadata from a URI!\n"));
+      ret = -1;
+      return;
+    }
   if ( ( (uri_string == NULL) || (extract_only) ) 
        && ( (args[0] == NULL) || (args[1] != NULL) ) )
     {
@@ -409,12 +415,6 @@ run (void *cls,
       ret = -1;
       return;
     }
-  if ((uri_string != NULL) && (extract_only))
-    {
-      printf (_("Cannot extract metadata from a URI!\n"));
-      ret = -1;
-      return;
-    }
   if (pseudonym != NULL)
     {
       if (NULL == this_id)
@@ -445,14 +445,6 @@ run (void *cls,
          return;
         }
     }
-  if ( (args[0] == NULL) &&
-       (uri_string == NULL) )
-    {
-      fprintf (stderr,
-              _("Need the name of a file to publish!\n"));
-      ret = 1;
-      return;
-    }
   cfg = c;
   ctx = GNUNET_FS_start (sched,
                         cfg,