mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- fixed the Linux portion of m_specialpaths.cpp which had a section of GetUserFile duplicated.
This commit is contained in:
parent
0645053431
commit
d36afb975c
1 changed files with 0 additions and 29 deletions
|
@ -461,36 +461,7 @@ FString M_GetSavegamesPath()
|
||||||
|
|
||||||
#else // Linux, et al.
|
#else // Linux, et al.
|
||||||
|
|
||||||
FString GetUserFile(const char *file)
|
|
||||||
{
|
|
||||||
FString path;
|
|
||||||
struct stat info;
|
|
||||||
|
|
||||||
path = NicePath("~/" GAME_DIR "/");
|
|
||||||
|
|
||||||
if (stat(path, &info) == -1)
|
|
||||||
{
|
|
||||||
struct stat extrainfo;
|
|
||||||
|
|
||||||
// Sanity check for ~/.config
|
|
||||||
FString configPath = NicePath("~/.config/");
|
|
||||||
if (stat(configPath, &extrainfo) == -1)
|
|
||||||
{
|
|
||||||
if (mkdir(configPath, S_IRUSR | S_IWUSR | S_IXUSR) == -1)
|
|
||||||
{
|
|
||||||
I_FatalError("Failed to create ~/.config directory:\n%s", strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!S_ISDIR(extrainfo.st_mode))
|
|
||||||
{
|
|
||||||
I_FatalError("~/.config must be a directory");
|
|
||||||
}
|
|
||||||
|
|
||||||
// This can be removed after a release or two
|
|
||||||
// Transfer the old zdoom directory to the new location
|
|
||||||
bool moved = false;
|
|
||||||
FString oldpath = NicePath("~/.zdoom/");
|
|
||||||
if (stat #if defined(__unix__)
|
|
||||||
FString GetUserFile (const char *file)
|
FString GetUserFile (const char *file)
|
||||||
{
|
{
|
||||||
FString path;
|
FString path;
|
||||||
|
|
Loading…
Reference in a new issue