Convert ReadOnlyTest to fileStream
This commit is contained in:
parent
60bfd5db34
commit
ddde5e41a3
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue