diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-02 11:48:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-02 11:48:33 +0000 |
commit | d175a8b7f6720f5f51524fb26041cb08cea4753b (patch) | |
tree | 93873ea93928f337386e9f81ca16cc9c4be1a605 /src/fs/fs_file_information.c | |
parent | 70bcf6c81ca6dd790e867483c111f45e207e2670 (diff) | |
download | gnunet-d175a8b7f6720f5f51524fb26041cb08cea4753b.tar.gz gnunet-d175a8b7f6720f5f51524fb26041cb08cea4753b.zip |
fix
Diffstat (limited to 'src/fs/fs_file_information.c')
-rw-r--r-- | src/fs/fs_file_information.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c index a110822d1..88d0ca386 100644 --- a/src/fs/fs_file_information.c +++ b/src/fs/fs_file_information.c | |||
@@ -752,8 +752,7 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, | |||
752 | { | 752 | { |
753 | struct GNUNET_FS_FileInformation *pos; | 753 | struct GNUNET_FS_FileInformation *pos; |
754 | 754 | ||
755 | if (dir->is_directory) | 755 | if (GNUNET_OK != |
756 | { | ||
757 | proc (proc_cls, | 756 | proc (proc_cls, |
758 | dir, | 757 | dir, |
759 | dir->data.dir.dir_size, | 758 | dir->data.dir.dir_size, |
@@ -762,10 +761,14 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, | |||
762 | &dir->anonymity, | 761 | &dir->anonymity, |
763 | &dir->priority, | 762 | &dir->priority, |
764 | &dir->expirationTime, | 763 | &dir->expirationTime, |
765 | &dir->client_info); | 764 | &dir->client_info)) |
766 | pos = dir->data.dir.entries; | 765 | return; |
767 | while (pos != NULL) | 766 | if (! dir->is_directory) |
768 | { | 767 | return; |
768 | pos = dir->data.dir.entries; | ||
769 | while (pos != NULL) | ||
770 | { | ||
771 | if (GNUNET_OK != | ||
769 | proc (proc_cls, | 772 | proc (proc_cls, |
770 | pos, | 773 | pos, |
771 | (pos->is_directory) ? pos->data.dir.dir_size : pos->data.file.file_size, | 774 | (pos->is_directory) ? pos->data.dir.dir_size : pos->data.file.file_size, |
@@ -774,21 +777,9 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, | |||
774 | &pos->anonymity, | 777 | &pos->anonymity, |
775 | &pos->priority, | 778 | &pos->priority, |
776 | &pos->expirationTime, | 779 | &pos->expirationTime, |
777 | &pos->client_info); | 780 | &pos->client_info)) |
778 | pos = pos->next; | 781 | break; |
779 | } | 782 | pos = pos->next; |
780 | } | ||
781 | else | ||
782 | { | ||
783 | proc (proc_cls, | ||
784 | dir, | ||
785 | dir->data.file.file_size, | ||
786 | dir->meta, | ||
787 | &dir->keywords, | ||
788 | &dir->anonymity, | ||
789 | &dir->priority, | ||
790 | &dir->expirationTime, | ||
791 | &dir->client_info); | ||
792 | } | 783 | } |
793 | } | 784 | } |
794 | 785 | ||