mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Fix QFS_FilelistFill for pak files.
Forgot to ensure the path separator was included in the fnmatch param. This fixes the broken *list commands.
This commit is contained in:
parent
fd96376b43
commit
1f0851cc61
1 changed files with 5 additions and 4 deletions
|
@ -1512,7 +1512,7 @@ QFS_FilelistFill (filelist_t *list, const char *path, const char *ext,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cp = cpath = QFS_CompressPath (path);
|
cp = cpath = QFS_CompressPath (path);
|
||||||
if (*cp == '/')
|
if (*cp && cp[strlen (cp) - 1] == '/')
|
||||||
separator = "";
|
separator = "";
|
||||||
|
|
||||||
for (search = qfs_searchpaths; search != NULL; search = search->next) {
|
for (search = qfs_searchpaths; search != NULL; search = search->next) {
|
||||||
|
@ -1522,9 +1522,10 @@ QFS_FilelistFill (filelist_t *list, const char *path, const char *ext,
|
||||||
|
|
||||||
for (i = 0; i < pak->numfiles; i++) {
|
for (i = 0; i < pak->numfiles; i++) {
|
||||||
char *name = pak->files[i].name;
|
char *name = pak->files[i].name;
|
||||||
|
if (!fnmatch (va("%s%s*.%s", cp, separator, ext), name,
|
||||||
if (!fnmatch (va("%s*.%s", cp, ext), name, FNM_PATHNAME)
|
FNM_PATHNAME)
|
||||||
|| !fnmatch (va("%s*.%s.gz", cp, ext), name, FNM_PATHNAME))
|
|| !fnmatch (va("%s%s*.%s.gz", cp, separator, ext), name,
|
||||||
|
FNM_PATHNAME))
|
||||||
QFS_FilelistAdd (list, name, strip ? ext : 0);
|
QFS_FilelistAdd (list, name, strip ? ext : 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue