| 1040 | } |
| 1041 | |
| 1042 | std::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 | |
| 1068 | BString FileSystemZip::getLocalFilePath() const { |
| 1069 | int pos = this->filePath.lastIndexOf('/'); |
no test coverage detected