From 67e96d48bad308de9b578c0ac940f02aabf9b019 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 18 Mar 2023 02:59:15 +0100 Subject: [PATCH] Use relative to content file path to find strings file To be used by esmtool when VFS is not used. --- components/esm4/reader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index 2ad655784e..faf9383fdc 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -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();