path browse fixes for win32 (update readdir_r to support DT_REG)

This commit is contained in:
Ron Pedde 2006-05-19 05:28:52 +00:00
parent a443cef62e
commit e11f7e2b30
2 changed files with 4 additions and 0 deletions

View File

@ -564,6 +564,8 @@ int os_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) {
entry->d_type = 0; entry->d_type = 0;
if(dirp->dir_find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { if(dirp->dir_find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
entry->d_type |= DT_DIR; entry->d_type |= DT_DIR;
} else if(dirp->dir_find_data.dwFileAttributes & FILE_ATTRIBUTE_NORMAL) {
entry->d_type |= DT_REG;
} }
/* /*

View File

@ -21,6 +21,8 @@ struct timezone {
}; };
#define DT_DIR 1 #define DT_DIR 1
#define DT_REG 2
#define DT_LNK 4
#define W_OK 2 #define W_OK 2
#define R_OK 4 #define R_OK 4