mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 18:09:17 +01:00
Updated dirnext return values to return correctly
This commit is contained in:
parent
9c7ddccd44
commit
698f3aecee
@ -33,6 +33,9 @@
|
|||||||
|
|
||||||
2006-08-14 - Chishm
|
2006-08-14 - Chishm
|
||||||
* Added directory iterator functions
|
* Added directory iterator functions
|
||||||
|
|
||||||
|
2006-08-19 - Chishm
|
||||||
|
* Updated dirnext return values to return correctly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -499,8 +502,7 @@ int _FAT_dirnext_r (struct _reent *r, dir_iter_t *dirState, char *filename, stru
|
|||||||
|
|
||||||
// Make sure there is another file to report on
|
// Make sure there is another file to report on
|
||||||
if (! state->validEntry) {
|
if (! state->validEntry) {
|
||||||
r->_errno = ENOENT;
|
return 0;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the filename
|
// Get the filename
|
||||||
@ -514,7 +516,7 @@ int _FAT_dirnext_r (struct _reent *r, dir_iter_t *dirState, char *filename, stru
|
|||||||
state->validEntry =
|
state->validEntry =
|
||||||
_FAT_directory_getNextEntry (state->partition, &(state->currentEntry));
|
_FAT_directory_getNextEntry (state->partition, &(state->currentEntry));
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _FAT_dirclose_r (struct _reent *r, dir_iter_t *dirState) {
|
int _FAT_dirclose_r (struct _reent *r, dir_iter_t *dirState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user