MCPcopy Create free account
hub / github.com/ZDoom/Raze / CheckAddon

Function CheckAddon

source/core/searchpaths.cpp:712–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710//==========================================================================
711
712static bool CheckAddon(GrpInfo* addon, GrpInfo* main, const char* filename)
713{
714 if (addon->dependencyCRC != main->CRC) return false;
715 FString path = ExtractFilePath(filename);
716 if (path.Len() > 0 && path.Back() != '/') path += '/';
717 for (auto& fn : addon->mustcontain)
718 {
719 FString check = path + fn;
720 if (FileExists(check)) continue;
721#if !defined _WIN32
722 check = path + fn.MakeLower();
723 if (FileExists(check)) continue;
724 check = path + fn.MakeUpper();
725 if (FileExists(check)) continue;
726#endif
727 return false;
728 }
729 return true;
730}
731
732//==========================================================================
733//

Callers 1

GrpScanFunction · 0.85

Calls 6

ExtractFilePathFunction · 0.85
LenMethod · 0.80
MakeLowerMethod · 0.80
MakeUpperMethod · 0.80
FileExistsFunction · 0.50
BackMethod · 0.45

Tested by

no test coverage detected