gnunet-svn
[Top][All Lists]
Advanced

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

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


From: grothoff
Subject: [GNUnet-SVN] r3682 - GNUnet/src/applications/fs/fsui
Date: Fri, 10 Nov 2006 13:54:49 -0800 (PST)

Author: grothoff
Date: 2006-11-10 13:54:46 -0800 (Fri, 10 Nov 2006)
New Revision: 3682

Modified:
   GNUnet/src/applications/fs/fsui/upload.c
Log:
add / for directory names -- important for recursive downloads

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2006-11-10 21:48:54 UTC (rev 
3681)
+++ GNUnet/src/applications/fs/fsui/upload.c    2006-11-10 21:54:46 UTC (rev 
3682)
@@ -199,6 +199,7 @@
   int ret;
   struct GE_Context * ectx;
   char * filename;
+  char * pfn;
   struct ECRS_URI * uri;
   size_t tpos;
 
@@ -274,9 +275,14 @@
   while ( (tpos > 0) &&
          (utc->filename[tpos] != '/') )
     tpos--;
+  pfn = MALLOC(strlen(&utc->filename[tpos+1]) + 2);
+  strcpy(pfn, &utc->filename[tpos+1]);
+  if (utc->child != NULL)
+    strcat(pfn, "/");
   ECRS_addToMetaData(utc->meta,
                     EXTRACTOR_FILENAME,
-                    &utc->filename[tpos+1]);
+                    pfn);
+  FREE(pfn);
   ECRS_delFromMetaData(utc->meta,
                       EXTRACTOR_SPLIT,
                       NULL);





reply via email to

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