mirror of https://github.com/mgba-emu/mgba.git
VFS: Fix directory node listing on some filesystems
This commit is contained in:
parent
5d9aa0250a
commit
67f14eee9e
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
0.8.4: (Future)
|
||||||
|
Other fixes:
|
||||||
|
- VFS: Fix directory node listing on some filesystems
|
||||||
|
|
||||||
0.8.3: (2020-08-03)
|
0.8.3: (2020-08-03)
|
||||||
Emulation fixes:
|
Emulation fixes:
|
||||||
- ARM: Fix LDM^ writeback to user-mode register
|
- ARM: Fix LDM^ writeback to user-mode register
|
||||||
|
|
|
@ -151,9 +151,10 @@ static enum VFSType _vdeType(struct VDirEntry* vde) {
|
||||||
#if !defined(WIN32) && !defined(__HAIKU__)
|
#if !defined(WIN32) && !defined(__HAIKU__)
|
||||||
if (vdede->ent->d_type == DT_DIR) {
|
if (vdede->ent->d_type == DT_DIR) {
|
||||||
return VFS_DIRECTORY;
|
return VFS_DIRECTORY;
|
||||||
|
} else if (vdede->ent->d_type == DT_REG) {
|
||||||
|
return VFS_FILE;
|
||||||
}
|
}
|
||||||
return VFS_FILE;
|
#endif
|
||||||
#else
|
|
||||||
const char* dir = vdede->p->path;
|
const char* dir = vdede->p->path;
|
||||||
char* combined = malloc(sizeof(char) * (strlen(vdede->ent->d_name) + strlen(dir) + 2));
|
char* combined = malloc(sizeof(char) * (strlen(vdede->ent->d_name) + strlen(dir) + 2));
|
||||||
sprintf(combined, "%s%s%s", dir, PATH_SEP, vdede->ent->d_name);
|
sprintf(combined, "%s%s%s", dir, PATH_SEP, vdede->ent->d_name);
|
||||||
|
@ -165,7 +166,6 @@ static enum VFSType _vdeType(struct VDirEntry* vde) {
|
||||||
return VFS_DIRECTORY;
|
return VFS_DIRECTORY;
|
||||||
}
|
}
|
||||||
return VFS_FILE;
|
return VFS_FILE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VDirCreate(const char* path) {
|
bool VDirCreate(const char* path) {
|
||||||
|
|
Loading…
Reference in New Issue