| 21 | #include "../../source/io/fszip.h" |
| 22 | |
| 23 | BoxedReg::BoxedReg(BoxedContainer* container, bool system) { |
| 24 | BString root = GlobalSettings::getRootFolder(container); |
| 25 | BString sep = BString::pathSeparator(); |
| 26 | this->filePath = root.stringByApppendingPath("home") + sep + "username" + sep + ".wine" + sep + (system?"system.reg":"user.reg"); |
| 27 | if (!Fs::doesNativePathExist(this->filePath)) { |
| 28 | std::shared_ptr<FileSystemZip> fs = container->getFileSystem().lock(); |
| 29 | if (fs) { |
| 30 | FsZip::extractFileFromZip(fs->filePath, B(system ? "home/username/.wine/system.reg" : "home/username/.wine/user.reg"), Fs::getNativeParentPath(this->filePath)); |
| 31 | } |
| 32 | } |
| 33 | readLinesFromFile(this->filePath, lines); |
| 34 | } |
| 35 | |
| 36 | bool BoxedReg::readKey(const char* path, const char* key, BString& value) { |
| 37 | bool found = false; |
nothing calls this directly
no test coverage detected