Skip to content

Conversation

@magic-cucumber
Copy link

@magic-cucumber magic-cucumber commented Dec 25, 2025

@JakeWharton close #1757.

  • Refactored FileSystem.list(): Extracted the core logic into a variantList function.
    • Moved the original implementation to unixMain.
    • Replaced the implementation in mingwX64Main with wide-character Win32 APIs.
  • Enhanced Error Reporting: Replaced FormatMessageA with FormatMessageW in lastErrorString to correctly handle wide-character error messages.
  • Updated WindowsPosixVariant: Replaced all narrow-character function calls with their corresponding wide-character versions to ensure full compatibility with the Windows filesystem.

@magic-cucumber
Copy link
Author

To test this PR, we need an Windows system with a non-UTF8 global encoding (such as GBK) and a test directory containing files with names that exceed the ANSI encoding range

@swankjesse
Copy link
Collaborator

This is neat!

@swankjesse swankjesse self-requested a review December 26, 2025 23:42
@magic-cucumber
Copy link
Author

magic-cucumber commented Jan 6, 2026

I forget called spotlessApply..., but now it's all ok :D @swankjesse

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.

metadata() fails on Windows with non-UTF-8 system locales (e.g., GBK) in MinGWX64

2 participants