Author: durner Date: 2005-12-20 13:00:39 -0800 (Tue, 20 Dec 2005) New Revision: 2360
Modified: gnunet-gtk/src/plugins/fs/download.c Log: Don't "suggest" names for GNUnet directories Modified: gnunet-gtk/src/plugins/fs/download.c =================================================================== --- gnunet-gtk/src/plugins/fs/download.c 2005-12-20 20:21:32 UTC (rev 2359) +++ gnunet-gtk/src/plugins/fs/download.c 2005-12-20 21:00:39 UTC (rev 2360) @@ -485,7 +485,13 @@ char fnURL[PATH_MAX + 1], dummy[2]; size_t len; - ren = ECRS_suggestFilename(fn); + len = strlen(ln); + /* Don't change the name of GNUnet directories (.gnd) */ + if (len >= 4 && strcmp(ln + len - 4, ".gnd") != 0) + ren = ECRS_suggestFilename(fn); + else + ren = NULL; + newFn = strrchr(ren ? ren : ln, DIR_SEPARATOR) + 1; dstPath = getFileName("FS", @@ -529,7 +535,7 @@ fnURL[len] = 0; /* avoid directory traversal */ - while(dotdot = strstr("../")) { + while(dotdot = strstr(dstFile, "../")) { dotdot[0] = '_'; dotdot[1] = '_'; } _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn