mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
path browse fixes for win32 (update readdir_r to support DT_REG)
This commit is contained in:
parent
a443cef62e
commit
e11f7e2b30
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user