Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002226Zandronum[All Projects] Bugpublic2015-05-10 20:422018-09-30 21:50
ReporterEdward-san 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version14.04 x86-64
Product Version3.0-beta 
Target Version3.0Fixed in Version3.0 
Summary0002226: Zandronum accidentally moves the files from '.zdoom', instead of '.zandronum', to '.config/zandronum'
DescriptionThis 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.
Additional InformationThis 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.
Attached Files

- Relationships
child of 0002172closedTorr Samaho Upgrade GZDoom base to 1.8.6 

-  Notes
User avatar (0012283)
Torr Samaho (administrator)
2015-05-16 12:39

I used GAMENAMELOWERCASE as you suggested. Regarding copy instead of move, this is something that should be changed in ZDoom (did they already change it?).
User avatar (0012284)
Edward-san (developer)
2015-05-16 12:53

Quote from Torr Samaho
Regarding copy instead of move, this is something that should be changed in ZDoom (did they already change it?).


ZDoom never changed that, probably because no one bothered about keeping the old stuff in the old place...
User avatar (0012285)
Dusk (developer)
2015-05-16 14:13

Seems quite late to change this in ZDoom now.
User avatar (0012290)
Edward-san (developer)
2015-05-16 17:05
edited on: 2015-05-16 17:05

Considering that the code could be removed in zdoom 2.8 because of:


        // This can be removed after a release or two
        // Transfer the old zdoom directory to the new location


User avatar (0013252)
Blzut3 (administrator)
2015-08-23 18:41

The move is very much intentional as it exists to migrate people to the new location without wasting hard disk space. Copying or creating a symlink after the move may be more suitable for us though since we have a testing program. Should change to moving for the final build though. Note that I'm pretty sure ZDoom will only move if the .config location does not exist.
User avatar (0013254)
Klofkac (reporter)
2015-08-23 19:01

I thought about another option: Not copying or moving, but instead creating a symbolic link. That way, both paths still work and files aren't duplicated.
User avatar (0013263)
Dusk (developer)
2015-08-25 09:58

Or we could've withhold the change until 3.0 was ready to be released. Too late now...
User avatar (0014944)
Torr Samaho (administrator)
2016-05-17 19:21
edited on: 2016-05-17 19:22

For now, I disabled the config file movement for non-release builds. Can somebody check if this works as intended?

User avatar (0014954)
Edward-san (developer)
2016-05-19 08:04

It works. I noticed that the 'created from scratch' ini contains the path '~/.config/zandronum' which isn't present in 2.0 zandronum.ini when the move was done. Should we tell the users to add it when 3.0 will be released and the move would be done?
User avatar (0014968)
WaTaKiD (updater)
2016-05-21 18:33

config file movement was disabled in 3.0 with:'https://bitbucket.org/Torr_Samaho/zandronum/commits/dfebab78f9458adf5d99c58eda7b0d826f6cd636 [^]'

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-05-10 20:42 Edward-san New Issue
2015-05-10 20:43 Edward-san Description Updated View Revisions
2015-05-11 12:39 Edward-san Summary [merge-experiments] Zandronum accidentally copies the files from '.zdoom', instead of '.zandronum', to '.config/zandronum' => [merge-experiments] Zandronum accidentally moves the files from '.zdoom', instead of '.zandronum', to '.config/zandronum'
2015-05-11 12:39 Edward-san Additional Information Updated View Revisions
2015-05-12 13:18 Arco Relationship added child of 0002172
2015-05-16 12:39 Torr Samaho Note Added: 0012283
2015-05-16 12:41 Torr Samaho Assigned To => Torr Samaho
2015-05-16 12:41 Torr Samaho Status new => needs testing
2015-05-16 12:53 Edward-san Note Added: 0012284
2015-05-16 14:13 Dusk Note Added: 0012285
2015-05-16 17:05 Edward-san Note Added: 0012290
2015-05-16 17:05 Edward-san Note Edited: 0012290 View Revisions
2015-05-24 18:56 Dusk Summary [merge-experiments] Zandronum accidentally moves the files from '.zdoom', instead of '.zandronum', to '.config/zandronum' => Zandronum accidentally moves the files from '.zdoom', instead of '.zandronum', to '.config/zandronum'
2015-05-24 19:29 Dusk Product Version 3.0 => 3.0-beta
2015-08-23 18:41 Blzut3 Note Added: 0013252
2015-08-23 19:01 Klofkac Note Added: 0013254
2015-08-25 09:58 Dusk Note Added: 0013263
2016-05-17 06:32 Torr Samaho Target Version => 3.0
2016-05-17 19:21 Torr Samaho Note Added: 0014944
2016-05-17 19:22 Torr Samaho Note Edited: 0014944 View Revisions
2016-05-19 08:04 Edward-san Note Added: 0014954
2016-05-21 18:33 WaTaKiD Note Added: 0014968
2017-02-06 18:57 Dusk Status needs testing => resolved
2017-02-06 18:57 Dusk Fixed in Version => 3.0
2017-02-06 18:57 Dusk Resolution open => fixed
2018-09-30 21:50 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker