diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-29 22:04:45 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-29 22:04:45 +0000 |
commit | 7a9cac25484d310cfe9da4a0c6c1887871538366 (patch) | |
tree | 72a20360cd8260a6c186ded3cfae33b9166dd3ef /src/fs/fs_dirmetascan.c | |
parent | 6756773dbc5aee6135ba8067cbf67aaf48cbfaf6 (diff) | |
download | gnunet-7a9cac25484d310cfe9da4a0c6c1887871538366.tar.gz gnunet-7a9cac25484d310cfe9da4a0c6c1887871538366.zip |
-fix
Diffstat (limited to 'src/fs/fs_dirmetascan.c')
-rw-r--r-- | src/fs/fs_dirmetascan.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 5ffa69229..9ee69c860 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c | |||
@@ -231,8 +231,12 @@ process_helper_msgs (void *cls, | |||
231 | ds->progress_callback (ds->progress_callback_cls, | 231 | ds->progress_callback (ds->progress_callback_cls, |
232 | filename, GNUNET_NO, | 232 | filename, GNUNET_NO, |
233 | GNUNET_FS_DIRSCANNER_FILE_START); | 233 | GNUNET_FS_DIRSCANNER_FILE_START); |
234 | expand_tree (ds->pos, | 234 | if (NULL == ds->toplevel) |
235 | filename, GNUNET_NO); | 235 | ds->toplevel = expand_tree (ds->pos, |
236 | filename, GNUNET_NO); | ||
237 | else | ||
238 | (void) expand_tree (ds->pos, | ||
239 | filename, GNUNET_NO); | ||
236 | return; | 240 | return; |
237 | case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY: | 241 | case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY: |
238 | if (filename[left-1] != '\0') | 242 | if (filename[left-1] != '\0') |
@@ -273,6 +277,11 @@ process_helper_msgs (void *cls, | |||
273 | GNUNET_break (0); | 277 | GNUNET_break (0); |
274 | break; | 278 | break; |
275 | } | 279 | } |
280 | if (NULL == ds->toplevel) | ||
281 | { | ||
282 | GNUNET_break (0); | ||
283 | break; | ||
284 | } | ||
276 | ds->progress_callback (ds->progress_callback_cls, | 285 | ds->progress_callback (ds->progress_callback_cls, |
277 | NULL, GNUNET_SYSERR, | 286 | NULL, GNUNET_SYSERR, |
278 | GNUNET_FS_DIRSCANNER_ALL_COUNTED); | 287 | GNUNET_FS_DIRSCANNER_ALL_COUNTED); |
@@ -339,6 +348,11 @@ process_helper_msgs (void *cls, | |||
339 | { | 348 | { |
340 | GNUNET_break (0); | 349 | GNUNET_break (0); |
341 | break; | 350 | break; |
351 | } | ||
352 | if (NULL == ds->toplevel) | ||
353 | { | ||
354 | GNUNET_break (0); | ||
355 | break; | ||
342 | } | 356 | } |
343 | GNUNET_HELPER_stop (ds->helper); | 357 | GNUNET_HELPER_stop (ds->helper); |
344 | ds->helper = NULL; | 358 | ds->helper = NULL; |