mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
Fix #887 - foobar paths should work again
This commit is contained in:
parent
79f81ac3ff
commit
5c9d52d939
@ -888,7 +888,7 @@ STREAMFILE* open_streamfile_by_ext(STREAMFILE* sf, const char* ext) {
|
||||
STREAMFILE* open_streamfile_by_filename(STREAMFILE* sf, const char* filename) {
|
||||
char fullname[PATH_LIMIT];
|
||||
char partname[PATH_LIMIT];
|
||||
char *path, *name;
|
||||
char *path, *name, *otherpath;
|
||||
|
||||
if (!sf || !filename || !filename[0]) return NULL;
|
||||
|
||||
@ -898,8 +898,9 @@ STREAMFILE* open_streamfile_by_filename(STREAMFILE* sf, const char* filename) {
|
||||
|
||||
/* check for non-normalized paths first (ex. txth) */
|
||||
path = strrchr(fullname, '/');
|
||||
if (!path)
|
||||
path = strrchr(fullname,'\\');
|
||||
otherpath = strrchr(fullname, '\\');
|
||||
if (otherpath > path)
|
||||
path = otherpath;
|
||||
|
||||
if (path) {
|
||||
path[1] = '\0'; /* remove name after separator */
|
||||
|
Loading…
Reference in New Issue
Block a user