diff options
author | Nils Durner <durner@gnunet.org> | 2005-11-03 19:01:35 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2005-11-03 19:01:35 +0000 |
commit | e2426138b8fecce95eb4c07fa1842f0d0ecc0860 (patch) | |
tree | 18ca9a591f616bb5677dbed690ce21161732ca97 | |
parent | 1ffdd8727f53065f82f7ae936ccf8b5b04bc597f (diff) | |
download | gnunet-gtk-e2426138b8fecce95eb4c07fa1842f0d0ecc0860.tar.gz gnunet-gtk-e2426138b8fecce95eb4c07fa1842f0d0ecc0860.zip |
disregard path of file to clear (check filename and URI only)
-rw-r--r-- | src/plugins/fs/download.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 2cfd36c2..20bbdf5c 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -563,7 +563,7 @@ static int delDownloadView(void * cls, | |||
563 | int isRecursive, | 563 | int isRecursive, |
564 | unsigned int anonymityLevel) { | 564 | unsigned int anonymityLevel) { |
565 | GtkTreeIter iter; | 565 | GtkTreeIter iter; |
566 | char * f; | 566 | char * f, * f2, * fn; |
567 | struct ECRS_URI * u; | 567 | struct ECRS_URI * u; |
568 | 568 | ||
569 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary), | 569 | if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary), |
@@ -572,10 +572,16 @@ static int delDownloadView(void * cls, | |||
572 | gtk_tree_model_get(GTK_TREE_MODEL(summary), | 572 | gtk_tree_model_get(GTK_TREE_MODEL(summary), |
573 | &iter, | 573 | &iter, |
574 | DOWNLOAD_FILENAME, &f, | 574 | DOWNLOAD_FILENAME, &f, |
575 | DOWNLOAD_LINKNAME, &f2, | ||
575 | DOWNLOAD_URI, &u, | 576 | DOWNLOAD_URI, &u, |
576 | -1); | 577 | -1); |
578 | |||
579 | f = strrchr(f, DIR_SEPARATOR); | ||
580 | f2 = strrchr(f2, DIR_SEPARATOR); | ||
581 | fn = strrchr(filename, DIR_SEPARATOR); | ||
582 | |||
577 | if ( (ECRS_equalsUri(u, uri)) && | 583 | if ( (ECRS_equalsUri(u, uri)) && |
578 | (0 == strcmp(f, filename)) ) { | 584 | (0 == strcmp(f, fn) || 0 == strcmp(f2, fn)) ) { |
579 | gtk_tree_store_remove(summary, | 585 | gtk_tree_store_remove(summary, |
580 | &iter); | 586 | &iter); |
581 | break; | 587 | break; |