MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / FindContainerPrefix

Function FindContainerPrefix

FEXCore/Source/Interface/Config/Config.cpp:321–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321fextl::string FindContainerPrefix() {
322 // We only support pressure-vessel at the moment
323 if (FHU::Filesystem::Exists(ContainerManager)) {
324 fextl::vector<char> Manager {};
325 if (FEXCore::FileLoading::LoadFile(Manager, ContainerManager)) {
326 // Trim the whitespace, may contain a newline
327 fextl::string ManagerStr = Manager.data();
328 ManagerStr = FEXCore::StringUtils::Trim(ManagerStr);
329 if (strncmp(ManagerStr.data(), "pressure-vessel", Manager.size()) == 0) {
330 // We are running inside of pressure vessel
331 // Our $CMAKE_INSTALL_PREFIX paths are now inside of /run/host/$CMAKE_INSTALL_PREFIX
332 return "/run/host/";
333 }
334 }
335 }
336 return {};
337}
338
339void ReloadMetaLayer() {
340 Meta->Load();

Callers 1

ReloadMetaLayerFunction · 0.85

Calls 4

LoadFileFunction · 0.85
TrimFunction · 0.85
ExistsFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected