ArmaScriptCompiler icon indicating copy to clipboard operation
ArmaScriptCompiler copied to clipboard

Cannot handle files that are not on a pdrive properly

Open dedmen opened this issue 4 years ago • 1 comments

https://github.com/dedmen/ArmaScriptCompiler/blob/master/src/main.cpp#L54

root_path is drive letter root, works fine for p-drive, doesn't work fine for not p-drive example, compile directory O:\dev\CBA_A3

for O:\dev\CBA_A3\addons\xeh\test The virtual path should be assembled from pboprefix, and relative path

iterate up directory structure till first pboprefix x\cba\addons\xeh

pathRelative = path.lexically_relative(directory of pboprefix file); -> pathRelative = /test

virtual path -> prefix/pathRelative -> x\cba\addons\xeh/test

dedmen avatar Jul 13 '21 12:07 dedmen

std::ifstream prefixFile(i->path()); std::string prefix; std::getline(prefixFile, prefix); prefixFile.close();

dedmen avatar Jul 13 '21 12:07 dedmen