View Revisions: Issue #2226 |
[ Back to Issue ] |
Summary |
0002226: Zandronum accidentally moves the files from '.zdoom', instead of '.zandronum', to '.config/zandronum' |
|
Revision |
2015-05-10 20:42 by Edward-san |
|
Description |
This is caused by this code snippet in src/m_misc.cpp:
// 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 (oldpath, &extrainfo) != -1)
{
if (rename(oldpath, path) == -1)
{
I_Error ("Failed to move old zdoom directory (%s) to new location (%s).",
oldpath.GetChars(), path.GetChars());
}
else
moved = true;
}
if (!moved && mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR) == -1)
{
I_FatalError ("Failed to create %s directory:\n%s",
path.GetChars(), strerror (errno));
}
|
|
Revision |
2015-05-10 20:43 by Edward-san |
|
Description |
This is caused by this code snippet in src/m_misc.cpp:
// 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 (oldpath, &extrainfo) != -1)
{
if (rename(oldpath, path) == -1)
{
I_Error ("Failed to move old zdoom directory (%s) to new location (%s).",
oldpath.GetChars(), path.GetChars());
}
else
moved = true;
}
if (!moved && mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR) == -1)
{
I_FatalError ("Failed to create %s directory:\n%s",
path.GetChars(), strerror (errno));
}
The fix is to replace 'zdoom' with 'GAMENAMELOWERCASE', which is 'zandronum' in our case. |
|
Revision |
2015-05-10 20:42 by Edward-san |
|
Additional Information |
|
|
Revision |
2015-05-11 12:39 by Edward-san |
|
Additional Information |
This is kind of dangerous. I lost some of the old .zdoom files (screenshots, savegames, inis) because of that.
If an user has run zandronum 3.0, he could be able to recover these by moving back the files to .zdoom, except for zandronum.ini.
Also, even if the issue above is fixed by changing the folder name, all the .zandronum data is moved away to .config/zandronum, causing problems when running zandronum 2.0. In order to avoid complications, it's better to 'copy' instead of 'rename'. No idea how to do this, though. |