mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
moved the hard coded exclusions for the file system to the blockedlist.
These exclusions are still engine specific, in case we want to use this in a more generic context they have to be disabled.
This commit is contained in:
parent
375faa649e
commit
96961a5663
2 changed files with 10 additions and 18 deletions
|
@ -356,27 +356,18 @@ void FResourceFile::PostProcessArchive(LumpFilterInfo *filter)
|
|||
if (NumLumps == 0 || !(Entries[0].Flags & RESFF_FULLPATH)) return;
|
||||
|
||||
// First eliminate all unwanted files
|
||||
for (uint32_t i = 0; i < NumLumps; i++)
|
||||
if (filter)
|
||||
{
|
||||
std::string name = Entries[i].FileName;
|
||||
// remove Apple garbage unconditionally.
|
||||
if (name.find("__macosx") == 0 || name.find("/__macosx") != std::string::npos)
|
||||
for (uint32_t i = 0; i < NumLumps; i++)
|
||||
{
|
||||
Entries[i].FileName = "";
|
||||
continue;
|
||||
}
|
||||
// Skip executables as well.
|
||||
if (wildcards::match(name, "*.bat") || wildcards::match(name, "*.exe"))
|
||||
{
|
||||
Entries[i].FileName = "";
|
||||
continue;
|
||||
}
|
||||
if (filter) for (auto& pattern : filter->blockednames)
|
||||
{
|
||||
if (wildcards::match(name, pattern))
|
||||
std::string name = Entries[i].FileName;
|
||||
for (auto& pattern : filter->blockednames)
|
||||
{
|
||||
Entries[i].FileName = "";
|
||||
continue;
|
||||
if (wildcards::match(name, pattern))
|
||||
{
|
||||
Entries[i].FileName = "";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1922,6 +1922,7 @@ void GetReserved(LumpFilterInfo& lfi)
|
|||
lfi.reservedFolders = { "flats/", "textures/", "hires/", "sprites/", "voxels/", "colormaps/", "acs/", "maps/", "voices/", "patches/", "graphics/", "sounds/", "music/",
|
||||
"materials/", "models/", "fonts/", "brightmaps/" };
|
||||
lfi.requiredPrefixes = { "mapinfo", "zmapinfo", "umapinfo", "gameinfo", "sndinfo", "sndseq", "sbarinfo", "menudef", "gldefs", "animdefs", "decorate", "zscript", "iwadinfo", "complvl", "terrain", "maps/" };
|
||||
lfi.blockednames = { "*.bat", "*.exe", "__macosx/*", "*/__macosx/*" };
|
||||
}
|
||||
|
||||
static FString CheckGameInfo(std::vector<std::string> & pwads)
|
||||
|
|
Loading…
Reference in a new issue