diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-22 18:34:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-22 18:34:29 +0000 |
commit | e483ac2a2c8eab6d5cc915c2f54ab2c27c469821 (patch) | |
tree | 0cdd2d9b3cc4fc62b085fb2f71103a100313448e /src/fs/gnunet-publish.c | |
parent | 3a04f1fdf2882b96608e164babcd34dbcb2ad777 (diff) | |
download | gnunet-e483ac2a2c8eab6d5cc915c2f54ab2c27c469821.tar.gz gnunet-e483ac2a2c8eab6d5cc915c2f54ab2c27c469821.zip |
LRN: two directory patches change the way "is_directory" is evaluated.
Now it must be GNUNET_YES for the execution flow to switch to a branch
where something is considered to be a directory.
The reason for that is that some functions might return GNUNET_SYSERR
when asked whether something is a directory or not. Checking this
value as "!= GNUNET_NO" will produce positive result, even though it's
not a directory.
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 8f8d9147c..50f507d93 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -378,7 +378,7 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item) | |||
378 | struct GNUNET_FS_FileInformation *fic; | 378 | struct GNUNET_FS_FileInformation *fic; |
379 | struct GNUNET_FS_ShareTreeItem *child; | 379 | struct GNUNET_FS_ShareTreeItem *child; |
380 | 380 | ||
381 | if (item->is_directory) | 381 | if (item->is_directory == GNUNET_YES) |
382 | { | 382 | { |
383 | GNUNET_CONTAINER_meta_data_delete (item->meta, | 383 | GNUNET_CONTAINER_meta_data_delete (item->meta, |
384 | EXTRACTOR_METATYPE_MIMETYPE, NULL, 0); | 384 | EXTRACTOR_METATYPE_MIMETYPE, NULL, 0); |
@@ -481,7 +481,7 @@ directory_scan_cb (void *cls, | |||
481 | case GNUNET_FS_DIRSCANNER_FILE_START: | 481 | case GNUNET_FS_DIRSCANNER_FILE_START: |
482 | if (verbose > 1) | 482 | if (verbose > 1) |
483 | { | 483 | { |
484 | if (is_directory) | 484 | if (is_directory == GNUNET_YES) |
485 | FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename); | 485 | FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename); |
486 | else | 486 | else |
487 | FPRINTF (stdout, _("Scanning file `%s'.\n"), filename); | 487 | FPRINTF (stdout, _("Scanning file `%s'.\n"), filename); |