Skip to content

[win] Fix ResourceFinder::includeDesktopDir returning the default path#5304

Merged
dacap merged 1 commit into
aseprite:mainfrom
ckaiser:fix-default-desktop
Jul 28, 2025
Merged

[win] Fix ResourceFinder::includeDesktopDir returning the default path#5304
dacap merged 1 commit into
aseprite:mainfrom
ckaiser:fix-default-desktop

Conversation

@ckaiser

@ckaiser ckaiser commented Jul 28, 2025

Copy link
Copy Markdown
Member

Fixes #5302

Uses SHGFP_TYPE_CURRENT which returns the Desktop that the user has configured instead of the default. Fixes Windows 11's OneDrive-by-default Desktop folder and any customizable/moved Desktop in general. Have not tested on Windows versions below 11 but we're still using the old API so it shouldn't really change anything.

Uses SHGFP_TYPE_CURRENT which returns the Desktop that the user has configured instead of the default, fixes Windows 11's OneDrive Desktop folder.
@ckaiser ckaiser requested a review from dacap as a code owner July 28, 2025 06:37
@aseprite-bot

Copy link
Copy Markdown
Collaborator

Hi there!

One or more of the commit messages in this PR do not match our code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@aseprite-bot

Copy link
Copy Markdown
Collaborator

clang-tidy review says "All clean, LGTM! 👍"

@dacap

dacap commented Jul 28, 2025

Copy link
Copy Markdown
Member

LGTM 👍 this function is used for the debug .txt file and for screenshots (ScreenshotCommand), and it looks like it matches the SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl) return value too (used in file_system.cpp / the Aseprite file dialog).

@dacap dacap merged commit 22e72ab into aseprite:main Jul 28, 2025
11 of 12 checks passed
@ckaiser ckaiser deleted the fix-default-desktop branch September 10, 2025 05:18
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.

-debug does not produce log file if Desktop folder is synced to OneDrive

3 participants