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

Method BoxedReg

source/ui/data/boxedReg.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include "../../source/io/fszip.h"
22
23BoxedReg::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
36bool BoxedReg::readKey(const char* path, const char* key, BString& value) {
37 bool found = false;

Callers

nothing calls this directly

Calls 5

BFunction · 0.85
readLinesFromFileFunction · 0.85
getFileSystemMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected