Skip to content

fix: return non-ASCII paths from app.getRecentDocuments() on Windows - #54351

Merged
MarshallOfSound merged 1 commit into
mainfrom
fix/win-recent-documents-unicode
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
fix/win-recent-documents-unicode

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Member

Description of Change

app.getRecentDocuments() on Windows resolved each .lnk by hand and converted the target with FilePath::MaybeAsASCII(), which returns an empty string for any non-ASCII path, so those documents were silently missing from the result. Use base::win::ResolveShortcut() and return the UTF-8 path. Adds a spec with a non-ASCII file name.

Checklist

Release Notes

Notes: Fixed app.getRecentDocuments() omitting documents with non-ASCII paths on Windows.

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@MarshallOfSound MarshallOfSound self-assigned this Sep 25, 2026
The shortcut target was converted with FilePath::MaybeAsASCII(), which
yields an empty string for any non-ASCII path, so those entries were
silently dropped. Resolve the .lnk with base::win::ResolveShortcut() and
return the UTF-8 path.
@MarshallOfSound
MarshallOfSound force-pushed the fix/win-recent-documents-unicode branch from 84fe1a6 to 4218ca4 Compare September 25, 2026 10:30
@MarshallOfSound
MarshallOfSound merged commit d8d4c96 into main Sep 25, 2026
73 checks passed
@MarshallOfSound
MarshallOfSound deleted the fix/win-recent-documents-unicode branch September 25, 2026 16:07
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed app.getRecentDocuments() omitting documents with non-ASCII paths on Windows.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "44-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/44-x-y and removed target/44-x-y PR should also be added to the "44-x-y" branch. labels Sep 25, 2026
@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54385

@trop trop Bot added in-flight/45-x-y and removed target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@MarshallOfSound has manually backported this PR to "44-x-y", please check out #54407

@trop trop Bot added in-flight/44-x-y merged/45-x-y PR was merged to the "45-x-y" branch. and removed needs-manual-bp/44-x-y in-flight/45-x-y labels Sep 25, 2026
MarshallOfSound added a commit that referenced this pull request Sep 25, 2026
…(44-x-y) (#54407)

fix: return non-ASCII paths from app.getRecentDocuments() on Windows (#54351)

The shortcut target was converted with FilePath::MaybeAsASCII(), which
yields an empty string for any non-ASCII path, so those entries were
silently dropped. Resolve the .lnk with base::win::ResolveShortcut() and
return the UTF-8 path.

(cherry picked from commit d8d4c96)
@trop trop Bot added merged/44-x-y PR was merged to the "44-x-y" branch. and removed in-flight/44-x-y labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants