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

Function CheckSingleFile

source/core/savegamehelp.cpp:278–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276//=============================================================================
277
278static bool CheckSingleFile (const char *name, bool &printRequires, bool printwarn)
279{
280 if (name == NULL)
281 {
282 return true;
283 }
284 if (strncmp(name, "file://", 7) == 0)
285 {
286 return FileExists(name + 7); // User maps must be present to be validated.
287 }
288 if (fileSystem.CheckIfResourceFileLoaded(name) < 0)
289 {
290 if (printwarn)
291 {
292 if (!printRequires)
293 {
294 Printf ("%s:\n%s", GStrings.GetString("TXT_SAVEGAMENEEDS"), name);
295 }
296 else
297 {
298 Printf (", %s", name);
299 }
300 }
301 printRequires = true;
302 return false;
303 }
304 return true;
305}
306
307//=============================================================================
308//

Callers 1

G_CheckSaveGameWadsFunction · 0.85

Calls 4

PrintfFunction · 0.85
FileExistsFunction · 0.50
GetStringMethod · 0.45

Tested by

no test coverage detected