gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1827 - GNUnet/src/applications/fs/ecrs


From: grothoff
Subject: [GNUnet-SVN] r1827 - GNUnet/src/applications/fs/ecrs
Date: Sun, 21 Aug 2005 16:42:26 -0700 (PDT)

Author: grothoff
Date: 2005-08-21 16:42:25 -0700 (Sun, 21 Aug 2005)
New Revision: 1827

Modified:
   GNUnet/src/applications/fs/ecrs/meta.c
Log:
fixing problem with rename if no filename is found in metadata

Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c      2005-08-21 22:21:22 UTC (rev 
1826)
+++ GNUnet/src/applications/fs/ecrs/meta.c      2005-08-21 23:42:25 UTC (rev 
1827)
@@ -763,8 +763,14 @@
          mime);
     mime = mimeMap[i][1];
   }
-  if (key == NULL)
-    key = filename;
+  if (key == NULL) {
+    key = &filename[strlen(filename)-1];
+    while ( (key != filename) &&
+           (key[0] != DIR_SEPARATOR) )
+      key--;
+    if (key[0] == DIR_SEPARATOR)
+      key++;    
+  }
   if (mime != NULL) {
     if (0 == strcmp(&key[strlen(key)-strlen(mime)],
                    mime))





reply via email to

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