From 258c6993c77b30cc70cca8e7efe8fa3a8eec87d2 Mon Sep 17 00:00:00 2001 From: obligaron Date: Mon, 10 May 2021 15:09:35 +0200 Subject: [PATCH] Revert "Convert ReadOnlyTest to fileStream" This reverts commit ddde5e41a3bb4acbfff597b726f67481508f021a. --- Source/restrict.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/restrict.cpp b/Source/restrict.cpp index 4ea626957..79f4f3eb4 100644 --- a/Source/restrict.cpp +++ b/Source/restrict.cpp @@ -17,11 +17,12 @@ namespace devilution { void ReadOnlyTest() { const std::string path = paths::PrefPath() + "Diablo1ReadOnlyTest.foo"; - auto fileStream = CreateFileStream(path.c_str(), std::ios::in | std::ios::out); - if (fileStream->fail()) { + FILE *f = fopen(path.c_str(), "wt"); + if (f == nullptr) { DirErrorDlg(paths::PrefPath().c_str()); } + fclose(f); RemoveFile(path.c_str()); }