Browse Source

Convert ReadOnlyTest to fileStream

pull/1925/head
obligaron 5 years ago committed by Anders Jenbo
parent
commit
ddde5e41a3
  1. 6
      Source/restrict.cpp

6
Source/restrict.cpp

@ -5,6 +5,7 @@
*/
#include "appfat.h"
#include "utils/file_util.h"
#include "utils/paths.h"
namespace devilution {
@ -16,12 +17,11 @@ namespace devilution {
void ReadOnlyTest()
{
const std::string path = paths::PrefPath() + "Diablo1ReadOnlyTest.foo";
FILE *f = fopen(path.c_str(), "wt");
if (f == nullptr) {
auto fileStream = CreateFileStream(path.c_str(), std::ios::in | std::ios::out);
if (fileStream->fail()) {
DirErrorDlg(paths::PrefPath().c_str());
}
fclose(f);
remove(path.c_str());
}

Loading…
Cancel
Save