1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 15:09:43 +00:00

Merge branch 'esmtool_strings' into 'master'

Use relative to content file path to find strings file

See merge request OpenMW/openmw!2837
This commit is contained in:
psi29a 2023-03-18 09:14:54 +00:00
commit 9664a57cad

View file

@ -225,8 +225,9 @@ namespace ESM4
sp.type = stringType;
// TODO: possibly check if the resource exists?
Files::IStreamPtr filestream
= mVFS ? mVFS->get(stringFile.string()) : Files::openConstrainedFileStream(stringFile);
Files::IStreamPtr filestream = mVFS
? mVFS->get(stringFile.string())
: Files::openConstrainedFileStream(mCtx.filename.parent_path() / stringFile);
filestream->seekg(0, std::ios::end);
std::size_t fileSize = filestream->tellg();