MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getNativePathForApp

Method getNativePathForApp

source/ui/data/boxedContainer.cpp:400–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400BString BoxedContainer::getNativePathForApp(const BoxedApp& app) {
401 for (auto& mount : mounts) {
402 BString path = mount.getFullLocalPath();
403 if (app.path.startsWith(path)) {
404 BString result = app.path;
405 return mount.nativePath + Fs::nativeFromLocal(app.path.substr(path.length())+"/"+app.cmd);
406 }
407 }
408 return GlobalSettings::getRootFolder(this) + Fs::nativeFromLocal(app.path + "/" + app.cmd);
409}
410
411bool BoxedContainer::addNewMount(const MountInfo& mountInfo) {
412 for (auto& mount : this->mounts) {

Callers 1

getIconTextureMethod · 0.80

Calls 4

getFullLocalPathMethod · 0.80
startsWithMethod · 0.80
substrMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected