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

Method getMissingDependency

source/ui/data/globalSettings.cpp:1042–1066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1040}
1041
1042std::shared_ptr<FileSystemZip> FileSystemZip::getMissingDependency() const {
1043 BString dependPath = GlobalSettings::getFileSystemFolder().stringByApppendingPath(depend);
1044 for (auto& w : GlobalSettings::availableFileSystemDependencies) {
1045 if (w->name == this->depend) {
1046 BString version;
1047 if (FsZip::readFileFromZip(dependPath, B("version.txt"), version)) {
1048 if (version != w->fsVersion) {
1049 return w;
1050 }
1051 }
1052 }
1053 }
1054 if (this->depend.length()) {
1055 if (!Fs::doesNativePathExist(this->depend)) {
1056 if (!Fs::doesNativePathExist(dependPath)) {
1057 for (auto& w : GlobalSettings::availableFileSystemDependencies) {
1058 if (w->name == this->depend) {
1059 return w;
1060 }
1061 }
1062 }
1063 }
1064 }
1065 return nullptr;
1066}
1067
1068BString FileSystemZip::getLocalFilePath() const {
1069 int pos = this->filePath.lastIndexOf('/');

Callers 2

downloadFileSystemMethod · 0.80

Calls 3

BFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected