In list_dir_el make sure PHYSFS_getRealDir won't give NULL to strcmp which will happen for files located in a Windows root directory
This commit is contained in:
parent
067d54f8e3
commit
6d475ad6b8
|
@ -1,5 +1,9 @@
|
||||||
D1X-Rebirth Changelog
|
D1X-Rebirth Changelog
|
||||||
|
|
||||||
|
20100828
|
||||||
|
--------
|
||||||
|
main/menu.c: In list_dir_el make sure PHYSFS_getRealDir won't give NULL to strcmp which will happen for files located in a Windows root directory
|
||||||
|
|
||||||
20100827
|
20100827
|
||||||
--------
|
--------
|
||||||
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
|
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
|
||||||
|
|
|
@ -1162,7 +1162,7 @@ void list_dir_el(browser *b, const char *origdir, const char *fname)
|
||||||
if (ext)
|
if (ext)
|
||||||
for (i = b->ext_list; *i != NULL && stricmp(ext, *i); i++) {} // see if the file is of a type we want
|
for (i = b->ext_list; *i != NULL && stricmp(ext, *i); i++) {} // see if the file is of a type we want
|
||||||
|
|
||||||
if ((!strcmp(PHYSFS_getRealDir(fname), b->view_path)) && (PHYSFS_isDirectory(fname) || (ext && *i))
|
if ((!strcmp((PHYSFS_getRealDir(fname)==NULL?"":PHYSFS_getRealDir(fname)), b->view_path)) && (PHYSFS_isDirectory(fname) || (ext && *i))
|
||||||
#if defined(__MACH__) && defined(__APPLE__)
|
#if defined(__MACH__) && defined(__APPLE__)
|
||||||
&& stricmp(fname, "Volumes") // this messes things up, use '..' instead
|
&& stricmp(fname, "Volumes") // this messes things up, use '..' instead
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue