Skip to content

FileManager fixes for Windows.#53

Merged
Nomagno merged 2 commits intoNomagno:tyre2X-devfrom
nutzboi:tyre2X-dev
Apr 2, 2026
Merged

FileManager fixes for Windows.#53
Nomagno merged 2 commits intoNomagno:tyre2X-devfrom
nutzboi:tyre2X-dev

Conversation

@nutzboi
Copy link
Copy Markdown

@nutzboi nutzboi commented Apr 2, 2026

Commit 9d8cecc makes file_manager.cpp detect compiling for Windows and compile the correct implementations. This fixes a bug (introduced in the command-manager fork) when updating existing addons using unofficial links on Windows.

Commit f8ed20e fixes linked directory issues by replacing MoveFileExW with std::filesystem::copy and ::remove_all (notice the #include <filesystem>) to allow the filemanager to follow NTFS Junctions (microsoftese for "hard links"), which are for some reason detected as normal directories by std::filesystem::status and due to microsoft's incompetence are almost completely impossible to use or resolve with the Win32 API functions at least with normal user privileges.
This fix is C++17 and later only and is thus incompatible with upstream STK 1.x and 2.x.

Agreement

By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.

This includes your previous contribution(s) under the same name of contributor.

Keep the above statement in the pull request comment for agreement.

nutzboi added 2 commits April 2, 2026 05:35
Consistent with 6c23f94. I suspect more like this commit should come.

Updating addons using unofficial links should now work on Windows as the proper implementation of removeDirectory is now the one compiled.
…lly to different disks.

This fix is compatible with C++17 and later only.
@Nomagno Nomagno merged commit a66ec78 into Nomagno:tyre2X-dev Apr 2, 2026
23 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants