openmohaa/code
Zack Middleton 9c0d66c9f2
Don't list mod directories at Windows drive root
The mod list on Windows would search the root of the drive if
fs_basepath, fs_homepath, fs_steampath, or fs_gogpath are blank ("")
(which is usually the case).

The issue is in the low-level Sys_ListFiles() but it only affects the
mod menu, on Windows. It cannot be abused by console commands to
list system files outside of the virtual filesystem.

---

If a directory at the root of the drive of the working directory
contained a pk3 file, the directory was listed in the mods menu. The
virtual filesystem doesn't add blank directory names to the search path
so it cannot load mods from the drive root. (Unless of course you set a
fs_*path cvar to "C:\".)

Sys_ListFiles() with blank directory caused Windows to use "\*" for the
search path and "\" prefix means root of drive. Unix opendir("") failed
so nothing was listed for blank directory.

Sys_ListFilteredFiles() with blank directory _and_ specifying subdirs
could access any directory (on Windows and Unix-like) but no code uses
this or makes it accessible.

These functions are only used for initializing the virtual filesystem
and listing mods. They are not accessible by anything else such as a
console command. Only the mods menu, on Windows, is affected.
2023-07-06 19:46:01 +02:00
..
AL Using latest version of AL from ioq3 codebase 2023-01-31 01:32:06 +01:00
asm ioquake3 porting 2023-05-24 19:29:36 +02:00
autoupdater ioquake3 porting 2023-05-24 19:29:36 +02:00
botlib ioquake3 porting 2023-05-24 19:29:36 +02:00
cgame Used clang-format on cgame module 2023-07-05 21:24:23 +02:00
client Replaced TARGET_GAME_VERSION with com_version->string 2023-07-02 20:08:18 +02:00
curl-7.54.0/include Using curl-7.54.0 from ioq3 2023-01-31 01:34:57 +01:00
fgame Fixed testthread crashing the game when the label parameter is unspecified 2023-07-05 21:41:43 +02:00
gamespy Used clang-format on gamespy files 2023-07-05 21:24:14 +02:00
jpeg-8c ioq3 updates 2023-05-26 20:53:00 +02:00
libmad-0.15.1b Fixed CMakeLists (tested with CMake 3.10) 2023-06-18 12:18:10 +02:00
libogg-1.3.3 Added libogg, libvorbis and opus from ioq3 2023-01-31 01:29:42 +01:00
libs ioq3 updates 2023-05-26 20:53:00 +02:00
libvorbis-1.3.6 Added libogg, libvorbis and opus from ioq3 2023-01-31 01:29:42 +01:00
null Fixed linux compilation errors 2023-06-25 22:07:17 +02:00
opus-1.2.1 ioq3 updates 2023-05-26 20:53:00 +02:00
opusfile-0.9 Added libogg, libvorbis and opus from ioq3 2023-01-31 01:29:42 +01:00
parser Used clang-format on some common files 2023-07-05 21:24:02 +02:00
q3_ui ioquake3 porting 2023-05-24 19:29:36 +02:00
qcommon Added a new constructor that accepts numArgs as parameters 2023-07-05 21:42:36 +02:00
renderer Fixed colors segmentation fault (because it was grabbing 4 bytes instead of 3 thanks to unsigned int*) 2023-07-02 21:22:15 +02:00
renderercommon Backported ioq3 features 2023-06-25 19:35:41 +02:00
renderergl1 Readded ioq3 renderer 2023-05-08 19:53:53 +02:00
renderergl2 made renderer (original quake III) work with SDL 2023-05-27 22:23:03 +02:00
script Used clang-format on some common files 2023-07-05 21:24:02 +02:00
sdl Windows: uses installed SDL first 2023-06-18 18:23:40 +02:00
SDL2 ioquake3 porting 2023-05-24 19:29:36 +02:00
server Fixed configstring not sending after post-loading 2023-07-04 23:06:02 +02:00
skeletor Tiny fixes related to bad printf formatting and sizes 2023-06-21 21:01:37 +02:00
sys Don't list mod directories at Windows drive root 2023-07-06 19:46:01 +02:00
tiki Tiny fixes related to bad printf formatting and sizes 2023-06-21 21:01:37 +02:00
tools Updates 2023-05-27 16:19:31 +02:00
uilib Reworked file inclusion (using relative path) 2023-06-17 01:24:20 +02:00
unix Removed **Sys_LoadDll** (unused) 2023-05-24 00:49:49 +02:00
win32 ioq3 sys 2023-05-25 19:09:32 +02:00
zlib ioquake3 porting 2023-05-24 19:29:36 +02:00