diff options
author | Christian Grothoff <christian@grothoff.org> | 2005-08-28 00:00:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2005-08-28 00:00:15 +0000 |
commit | 385b579b6d848ca34f651a74c41dd389d86552b7 (patch) | |
tree | 68bbeee5a9ee77a0e91b502aabb7ce87dad53cb4 | |
parent | 4747bdd887388096bd86041e11608bf787caf07a (diff) | |
download | gnunet-gtk-385b579b6d848ca34f651a74c41dd389d86552b7.tar.gz gnunet-gtk-385b579b6d848ca34f651a74c41dd389d86552b7.zip |
bugfixes
-rw-r--r-- | src/plugins/fs/download.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c index 461b10b7..3a36d4ed 100644 --- a/src/plugins/fs/download.c +++ b/src/plugins/fs/download.c | |||
@@ -240,11 +240,16 @@ static void initiateDownload(GtkTreeModel * model, | |||
240 | dirTreePath = gtk_tree_path_copy(path); | 240 | dirTreePath = gtk_tree_path_copy(path); |
241 | dirPath = MALLOC(1); | 241 | dirPath = MALLOC(1); |
242 | dirPathLen = 0; | 242 | dirPathLen = 0; |
243 | while (gtk_tree_path_up(dirTreePath)) { | 243 | while (gtk_tree_path_get_depth(dirTreePath) > 1) { |
244 | const char *dirname; | 244 | const char *dirname; |
245 | char *new; | 245 | char *new; |
246 | 246 | ||
247 | if (!gtk_tree_model_get_iter(model, &iiter, dirTreePath)) | 247 | if (! gtk_tree_path_up(dirTreePath)) |
248 | break; | ||
249 | |||
250 | if (!gtk_tree_model_get_iter(model, | ||
251 | &iiter, | ||
252 | dirTreePath)) | ||
248 | break; | 253 | break; |
249 | gtk_tree_model_get(model, | 254 | gtk_tree_model_get(model, |
250 | &iiter, | 255 | &iiter, |
@@ -258,7 +263,7 @@ static void initiateDownload(GtkTreeModel * model, | |||
258 | FREE(dirPath); | 263 | FREE(dirPath); |
259 | dirPath = new; | 264 | dirPath = new; |
260 | } | 265 | } |
261 | g_object_unref(dirTreePath); | 266 | gtk_tree_path_free(dirTreePath); |
262 | 267 | ||
263 | list->filename = pfx; | 268 | list->filename = pfx; |
264 | head = list; | 269 | head = list; |