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/fs_api.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/fs_api.c')
-rw-r--r-- | src/fs/fs_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 67be447f6..1df9b2e0a 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c | |||
@@ -1210,7 +1210,7 @@ find_file_position (struct GNUNET_FS_FileInformation *pos, const char *srch) | |||
1210 | { | 1210 | { |
1211 | if (0 == strcmp (srch, pos->serialization)) | 1211 | if (0 == strcmp (srch, pos->serialization)) |
1212 | return pos; | 1212 | return pos; |
1213 | if (pos->is_directory) | 1213 | if (pos->is_directory == GNUNET_YES) |
1214 | { | 1214 | { |
1215 | r = find_file_position (pos->data.dir.entries, srch); | 1215 | r = find_file_position (pos->data.dir.entries, srch); |
1216 | if (r != NULL) | 1216 | if (r != NULL) |