diff options
author | Nils Durner <durner@gnunet.org> | 2005-12-22 19:18:02 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2005-12-22 19:18:02 +0000 |
commit | 70ffeb65934f035b77c0cfe9bc0451442d81365c (patch) | |
tree | e8e61658c2b95625b2538aa12a54e8d988cc0db4 | |
parent | e70a8dec5b6ca856f28bac2ce62e9d014dfe7f3d (diff) | |
download | gnunet-gtk-70ffeb65934f035b77c0cfe9bc0451442d81365c.tar.gz gnunet-gtk-70ffeb65934f035b77c0cfe9bc0451442d81365c.zip |
replace .. in filenames
-rw-r--r-- | src/plugins/fs/namespace.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/fs/namespace.c b/src/plugins/fs/namespace.c index b8127d98..5f9c99c5 100644 --- a/src/plugins/fs/namespace.c +++ b/src/plugins/fs/namespace.c | |||
@@ -222,6 +222,13 @@ static int updateView(const ECRS_FileInfo * fi, | |||
222 | -1); | 222 | -1); |
223 | if (filename == NULL) | 223 | if (filename == NULL) |
224 | filename = STRDUP(_("no name given")); | 224 | filename = STRDUP(_("no name given")); |
225 | else { | ||
226 | char dotdot; | ||
227 | |||
228 | while(dotdot = strstr(filename, "..")) | ||
229 | dotdot[0] = dotdot[1] = '_'; | ||
230 | } | ||
231 | |||
225 | if (ECRS_isFileUri(fi->uri)) | 232 | if (ECRS_isFileUri(fi->uri)) |
226 | size = ECRS_fileSize(fi->uri); | 233 | size = ECRS_fileSize(fi->uri); |
227 | else | 234 | else |
@@ -331,6 +338,12 @@ static int addNamespaceContentToModel(void * cls, | |||
331 | -1); | 338 | -1); |
332 | if (filename == NULL) | 339 | if (filename == NULL) |
333 | filename = STRDUP(_("no name given")); | 340 | filename = STRDUP(_("no name given")); |
341 | else { | ||
342 | char dotdot; | ||
343 | |||
344 | while(dotdot = strstr(filename, "..")) | ||
345 | dotdot[0] = dotdot[1] = '_'; | ||
346 | } | ||
334 | desc = ECRS_getFirstFromMetaData(fi->meta, | 347 | desc = ECRS_getFirstFromMetaData(fi->meta, |
335 | EXTRACTOR_DESCRIPTION, | 348 | EXTRACTOR_DESCRIPTION, |
336 | EXTRACTOR_GENRE, | 349 | EXTRACTOR_GENRE, |