mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
Include filesize when opening a file with searchpaths
This commit is contained in:
@ -240,11 +240,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<std::istream> Open(const std::string& fileName) override
|
||||
SearchPathOpenFile Open(const std::string& fileName) override
|
||||
{
|
||||
if (m_unz_file == nullptr)
|
||||
{
|
||||
return nullptr;
|
||||
return SearchPathOpenFile();
|
||||
}
|
||||
|
||||
auto iwdFilename = fileName;
|
||||
@ -266,13 +266,13 @@ public:
|
||||
{
|
||||
auto result = std::make_unique<IWDFile>(this, m_unz_file, iwdEntry->second.m_size);
|
||||
m_last_file = result.get();
|
||||
return std::make_unique<iobjstream>(std::move(result));
|
||||
return SearchPathOpenFile(std::make_unique<iobjstream>(std::move(result)), iwdEntry->second.m_size);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return SearchPathOpenFile();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return SearchPathOpenFile();
|
||||
}
|
||||
|
||||
std::string GetPath() override
|
||||
@ -342,7 +342,7 @@ bool IWD::Initialize()
|
||||
return m_impl->Initialize();
|
||||
}
|
||||
|
||||
std::unique_ptr<std::istream> IWD::Open(const std::string& fileName)
|
||||
SearchPathOpenFile IWD::Open(const std::string& fileName)
|
||||
{
|
||||
return m_impl->Open(fileName);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ public:
|
||||
static ObjContainerRepository<IWD, ISearchPath> Repository;
|
||||
|
||||
IWD(std::string path, std::unique_ptr<std::istream> stream);
|
||||
~IWD();
|
||||
~IWD() override;
|
||||
|
||||
IWD(const IWD& other) = delete;
|
||||
IWD(IWD&& other) noexcept;
|
||||
@ -29,7 +29,7 @@ public:
|
||||
*/
|
||||
bool Initialize();
|
||||
|
||||
std::unique_ptr<std::istream> Open(const std::string& fileName) override;
|
||||
SearchPathOpenFile Open(const std::string& fileName) override;
|
||||
std::string GetPath() override;
|
||||
std::string GetName() override;
|
||||
void Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback) override;
|
||||
|
Reference in New Issue
Block a user