devilutionX/Source/restrict.cpp
Gleb Mazovetskiy a091a56e8e
Remove MAX_PATH restriction (#898)
Do not limit filesystem paths to 259 chars for MPQs, save files, and diablo.ini.

The MAX_PATH constant remains but now only limits path lengths within the MPQs.
2020-10-26 13:39:27 +01:00

28 lines
585 B
C++

/**
* @file restrict.cpp
*
* Implementation of functionality for checking if the game will be able run on the system.
*/
#include "all.h"
#include "paths.h"
#include "../3rdParty/Storm/Source/storm.h"
DEVILUTION_BEGIN_NAMESPACE
/**
* @brief Check that we have write access to the game install folder
*/
void ReadOnlyTest()
{
const std::string path = GetPrefPath() + "Diablo1ReadOnlyTest.foo";
FILE *f = fopen(path.c_str(), "wt");
if (!f) {
DirErrorDlg(GetPrefPath().c_str());
}
fclose(f);
remove(path.c_str());
}
DEVILUTION_END_NAMESPACE