MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / IsPathSane

Function IsPathSane

Source/Internal/filesystem.cpp:1202–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1200}
1201
1202bool IsPathSane(const char* path) {
1203 bool ret = true;
1204 for (unsigned i = 0; i < strlen(path); i++) {
1205 if (path[i] == '\\') {
1206 ret = false;
1207 }
1208 if (i != 0) {
1209 if (path[i - 1] == '/' && path[i] == '/') {
1210 ret = false;
1211 }
1212 }
1213 }
1214 return ret;
1215}
1216
1217string GenerateParallelPath(const char* base, const char* target, const char* postfix, Path asset) {
1218 LOG_ASSERT(strlen(base) > 0);

Callers 2

SanitizePathFunction · 0.85
GenerateParallelPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected