gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r6743 - GNUnet/src/applications/fs/fsui


From: gnunet
Subject: [GNUnet-SVN] r6743 - GNUnet/src/applications/fs/fsui
Date: Wed, 23 Apr 2008 06:20:33 -0600 (MDT)

Author: holindho
Date: 2008-04-23 06:20:32 -0600 (Wed, 23 Apr 2008)
New Revision: 6743

Modified:
   GNUnet/src/applications/fs/fsui/recursivetest.c
Log:
fix test case checking phase


Modified: GNUnet/src/applications/fs/fsui/recursivetest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/recursivetest.c     2008-04-23 09:41:09 UTC 
(rev 6742)
+++ GNUnet/src/applications/fs/fsui/recursivetest.c     2008-04-23 12:20:32 UTC 
(rev 6743)
@@ -65,7 +65,6 @@
   done = 0;
   while (!done && tree[index] != '\0')
     {
-    printf("%s/%u\n", current, fi);
     s = GNUNET_malloc (strlen(current)+strlen(DIR_SEPARATOR_STR)+14);
     GNUNET_snprintf (s, strlen(current)+strlen(DIR_SEPARATOR_STR)+14,
                      "%s%s%u",
@@ -73,24 +72,30 @@
     switch (tree[index++])
       {
       case 'd':
-        if (check && GNUNET_disk_directory_test (NULL, s) == GNUNET_NO)
+        if (check)
           {
-            index = -1;
-            done = 1;
+            if (GNUNET_disk_directory_test (NULL, s) == GNUNET_NO)
+              {
+                index = -1;
+                done = 1;
+              }
           }
         else
           {
             GNUNET_disk_directory_create (NULL, s);
           }
         if (!done)
-          index = makeHierarchyHelper (s, tree, index, 0);
+          index = makeHierarchyHelper (s, tree, index, check);
         break;
       case 'f':
-        if (check && GNUNET_disk_directory_test (NULL, s) != GNUNET_NO)
+        if (check)
           {
            /* TODO: compare file contents */
-            index = -1;
-            done = 1;
+            if (GNUNET_disk_directory_test (NULL, s) != GNUNET_NO) 
+              {
+                index = -1;
+                done = 1;
+              }
           }
         else
           {
@@ -132,8 +137,8 @@
   fn = makeName(i);
   if (GNUNET_disk_directory_test (NULL, fn) != GNUNET_YES)
     return GNUNET_SYSERR;
-  res = (makeHierarchyHelper (fn, tree, 0, 1) == -1) ?
-         GNUNET_SYSERR : GNUNET_OK;
+  res = ((makeHierarchyHelper (fn, tree, 0, 1) == -1) ?
+         GNUNET_SYSERR : GNUNET_OK);
   GNUNET_free(fn);
   return res;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]