From 46534e46c82c4a8e3822cbdf2b43a260a14f0f30 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 9 Jan 2010 18:46:56 +0000 Subject: [PATCH] also support the .dir and .d extensions for virtual packs git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9819 d7cf8633-e32d-0410-b094-e92efae38249 --- fs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs.c b/fs.c index 669f8b32..c2207f08 100644 --- a/fs.c +++ b/fs.c @@ -1153,6 +1153,16 @@ void FS_AddGameDirectory (const char *dir) } } + // add any virtual packs in the directory + for (i = 0;i < list.numstrings;i++) + { + if (!strcasecmp(FS_FileExtension(list.strings[i]), "dir") || (!strcasecmp(FS_FileExtension(list.strings[i]), "d")) + // we don't want precedence of .d vs .dir, but use the name as primary key + { + FS_AddPack_Fullpath(list.strings[i], list.strings[i] + strlen(dir), NULL, false); + } + } + stringlistfreecontents(&list); // Add the directory to the search path -- 2.39.2