aboutsummaryrefslogtreecommitdiff
path: root/core/src/Utils/IO/Archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/Utils/IO/Archive.cpp')
-rw-r--r--core/src/Utils/IO/Archive.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/Utils/IO/Archive.cpp b/core/src/Utils/IO/Archive.cpp
index b6f806b..6c4084f 100644
--- a/core/src/Utils/IO/Archive.cpp
+++ b/core/src/Utils/IO/Archive.cpp
@@ -12,7 +12,7 @@ constexpr uint8_t kByteOrderMark = []() {
std::optional<InputDataStream> DataArchive::LoadFile(const std::filesystem::path& path)
{
- auto stream = InputDataStream(std::fstream(path));
+ auto stream = InputDataStream(InputFileStream(path));
uint8_t magicNumbers[kMagicNumberCount];
stream.ReadBytes(kMagicNumberCount, magicNumbers);
@@ -37,7 +37,7 @@ std::optional<InputDataStream> DataArchive::LoadFile(const std::filesystem::path
std::optional<OutputDataStream> DataArchive::SaveFile(const std::filesystem::path& path)
{
- auto stream = OutputDataStream(std::fstream(path));
+ auto stream = OutputDataStream(OutputFileStream(path, OutputFileStream::TruncateFile));
stream.WriteBytes(kMagicNumberCount, kMagicNumbers);
stream.Write(kByteOrderMark);