bugBattle for Wesnoth - Bugs: bug #21891, [regression] Incorrect save folder...

Show feedback again

bug #21891: [regression] Incorrect save folder on Windows

Submitted by:  Adrien Beau <adrienbeau>
Submitted on:  Thu 03 Apr 2014 09:45:22 PM UTC  
Category: BugSeverity: 4 - Important
Priority: 5 - NormalItem Group:  None of the others
Status: Wont FixPrivacy: Public
Assigned to: Sergey Popov <loonycyborg>Open/Closed: Open
Release: 1.11.12Operating System: Windows 7

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Wed 28 Oct 2015 04:16:53 AM UTC, comment #7:

As wedge009 commented, the development team decided to continue using 'My Games'
a) Wesnoth isn't the only game to use that directory, see e.g. Skyrim.
b) displaying a localized name via a hidden desktop.ini file isn't too hard; however we deemed it could potentially confuse players of aforementioned other games.

If the 'My Games' folder really is an eyesore to you, you can edit your Wesnoth shortcut in the start menu and add
--userconfig-dir D:/Users/abeau/Saved Games/Wesnoth1.12

Sebastia K├Âlle <aquileia>
Project Member
Wed 21 Oct 2015 07:51:50 AM UTC, comment #6:

shadowm just committed a switch to 'My Games' as the default user directory for bug #23753.

Wedge009 <wedge009>
Sat 17 Oct 2015 08:21:36 AM UTC, comment #5:

The relevant code seems to be set_user_data_dir() of src/filesystem_boost.cpp. It's using SHGetSpecialFolderPath(), which is deprecated in favour of SHGetFolderPath(), which itself is deprecated in favour of SHGetKnownFolderPath().

SHGetSpecialFolderPath: Minimum Windows 2000 Professional (Shell32.dll from IE4)
SHGetFolderPath: Minimum Windows 2000 Profressional / XP (Shell32.dll from Win2000)
SHGetKnownFolderPath: Minimum Windows Vista

Some relevant documentation (correct locations as of October 2015):
SHGetSpecialFolderPath: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762204.aspx
SHGetFolderPath: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762181.aspx
SHGetKnownFolderPath: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762188.aspx
Known Folder IDs: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457.aspx

shadowm stated minimum Windows support as of 17th October 2015 is Windows XP - we won't be increasing that until and unless we need a feature that is only available in later Windows. I think it should still be possible to make Windows Vista and later use Saved Games directory and Windows XP fall back to My Documents\My Games. But I would only consider this if that's something that everyone agrees is a good idea - having mixed directories across different versions of a single OS is potentially confusing... although that hasn't stopped MS from changing these 'known' directories with seemingly every release.

Wedge009 <wedge009>
Sat 17 Oct 2015 07:36:40 AM UTC, comment #4:

I'm not sure what's going on here. I just did a fresh installation of 1.10.7, choosing 'install just for me' and save games in 'My Games', but it looks like my save games are going into the installation directory.

Which begs the question of how Adrien got games to be saved in the Windows 7 Saved Games directory (which would be a good place to use in Windows, actually) in the first place. If it wasn't through default 1.10.x behaviour I'm not so sure this is a regression so much as a feature request.

I'm also using Windows 7, BTW. For the time being it looks like Wesnoth, being cross-platform still uses 'My Games' in the OS-appropriate user directory, whichever that happens to be.

Wedge009 <wedge009>
Tue 20 May 2014 11:07:30 AM UTC, comment #3:

I wonder why does 1.10 use Saved Games. I don't remember adding explicit support for that myself. If someone else did then perhaps it can be ported to 1.11 too..

Sergey Popov <loonycyborg>
Project MemberIn charge of this item.
Fri 04 Apr 2014 08:41:29 AM UTC, comment #2:

Are you a member of the DEV team? Why would you not install the game in AppData, since this is one of the two options offered by the installer?

Note that in case you don't know, installing in AppData is a perfectly fine choice, notably for people who do not have admin rights and cannot install in Program Files. This is what Chrome did for years, for example. Wesnoth works just fine in AppData.

Anyway, I only mentioned the installation folder in case it had an influence on the save folder location.

As for the save folder, you might be fine with an English name in the middle of your documents in a non-English operating system, but the standard under Windows is the "Saved Games" folder, which has a specific icon, a specific name translated by Microsoft in every language they support, and which can be properly moved by the user even after games are installed.

(I am aware that the folder does not only contain save files, but also cache, user-made scenarios, etc. Overall, it's the user-specific game state, and it is fine to put it all under the "Saved Games" folder.)

Adrien Beau <adrienbeau>
Fri 04 Apr 2014 12:19:39 AM UTC, comment #1:

this sounds like you installed wesnoth in C:/Users/abeau/AppData/Local/Battle for Wesnoth 1.11.12 ? that is not where i'd install it.

Note that the userdata folder not only contains savefiles but also other data, and that is good because it's the same on all os, so one can just move that folder to his other computer if he wants his old wesnoth an a new computer.

Plus im quiet happy with My Games as the parent folder of the the userdata folder. And at least for me 1.10.6 did also store its saved games there.

Also 2 (one of them is wesnoth) of all games, from which i have savegames, store their data there while 0 savefiles are found in the "Saved Games" Folder, so "My Games" seems to be a normal location for that.

Thu 03 Apr 2014 09:45:22 PM UTC, original submission:

(This problem also occurs on 1.11.11. I have not tried earlier 1.11 versions.)

During installation, I chose to install "Just for me". Later in the installer, I was given the choice between two options:

  • Store userdata in the install location
  • Store userdata (preferences, saved games..) in

My Documents\My Games\Wesnoth1.11

However, the standard folder to store user game data since Windows Vista is the "Saved Games" folder that is typically found in the user profile (I believe there should be an API to get that folder name, because it is part of a set of standard profile folders).

The "Saved Games" folder is shown appropriately translated to the user language in the Windows Explorer. The "My Games" directory that Wesnoth uses is not. It is frankly an eyesore in an otherwise tidy "My Documents" folder.

All other games use the "Saved Games" standard folder. Wesnoth is alone in that English directory it incorrectly created.

Wesnoth 1.10 did not have that problem. It properly stored its settings in the standard "Saved Games" directory.

Here is the output from stderr.txt on the first run of Wesnoth after a clean install:

Battle for Wesnoth v1.11.12
Started on Thu Apr 03 23:24:35 2014

Automatically found a possible data directory at C:/Users/abeau/AppData/Local/Battle for Wesnoth 1.11.12
20140403 23:24:35 error filesystem: Could not open 'D:/Users/abeau/Documents/My Games/Wesnoth1.11/preferences' for reading.

Data directory: C:/Users/abeau/AppData/Local/Battle for Wesnoth 1.11.12
User configuration directory: D:/Users/abeau/Documents/My Games/Wesnoth1.11
User data directory: D:/Users/abeau/Documents/My Games/Wesnoth1.11
Cache directory: D:/Users/abeau/Documents/My Games/Wesnoth1.11/cache
Checking video mode: 1024x768x32...
setting mode to 1024x768x32
20140403 23:24:36 error filesystem: Trying to open file with empty name.

The correct folder used by Wesnoth 1.10.x is:

D:/Users/abeau/Saved Games/Wesnoth1.10

Adrien Beau <adrienbeau>


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by aquileia (Posted a comment)
  • -unavailable- added by wedge009 (Posted a comment)
  • -unavailable- added by loonycyborg (Posted a comment)
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by adrienbeau (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Oct 2015 04:16:53 AM UTCaquileiaStatusNone=>Wont Fix
    Sat 05 Apr 2014 04:35:25 AM UTCshadowmasterAssigned toNone=>loonycyborg
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup