summaryrefslogtreecommitdiff
path: root/src/cmd.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-10-01 16:33:37 +0400
committerAndrey Nazarov <skuller@skuller.net>2010-10-01 17:21:52 +0400
commit57ff04fceb133d7c06c67bf991b5941766bb28da (patch)
tree4f7ca34f1a58cd35059c76f72dbdaadcc81684c7 /src/cmd.c
parentffd86f8fccf7a523e89553fefaa621457460aa38 (diff)
Clean up and fix file listing functions.
- Merge Sys_ListFiles and Sys_ListFilteredFiles into the single Sys_ListFiles_r implementatation (per platform). - Fix an off-by-one bug in Sys_ListFiles (per platform). - Fix an off-by-one bug in FS_ListFiles. - Made Sys_ListFiles ignore hidden and non-regular (irregular?) files on Unix. - Limit maximum recursion depth to 8 (opposed to 32 on Unix and unlimited depth on Win32). - Reduce listed files limit to 2048 from 4096. - Implement FS_SEARCH_STRIPEXT flag instead of ugly hack in FS_File_g. - Kill unused FS_SEARCH_NOSORT flag. - Replace FS_SEARCHDIRS_* cruft with single FS_SEARCH_DIRSONLY flag. - Use unsigned integer type for flags. - Don't list more than 128 files to avoid console spam.
Diffstat (limited to 'src/cmd.c')
-rw-r--r--src/cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd.c b/src/cmd.c
index cf29739..2293e95 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1552,7 +1552,7 @@ finish:
}
void Cmd_Config_g( genctx_t *ctx ) {
- FS_File_g( "", "*.cfg", FS_SEARCH_SAVEPATH | FS_SEARCH_BYFILTER | 0x80000000, ctx );
+ FS_File_g( "", "*.cfg", FS_SEARCH_SAVEPATH | FS_SEARCH_BYFILTER | FS_SEARCH_STRIPEXT, ctx );
}
static void Cmd_Exec_c( genctx_t *ctx, int argnum ) {