Fix lfs.attributes() reporting paths with non-ASCII characters as non-existent on Windows - #666
Open
line0 wants to merge 1 commit into
Open
Fix lfs.attributes() reporting paths with non-ASCII characters as non-existent on Windows#666line0 wants to merge 1 commit into
lfs.attributes() reporting paths with non-ASCII characters as non-existent on Windows#666line0 wants to merge 1 commit into
Conversation
Member
|
Filed https://developercommunity.visualstudio.com/t/C1001-in-msc1cpp:-filesystem::path-deri/11134321 and it should probably be linked in the comment. We'll have to include the workaround until we no longer want to support affected VS versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lfs.attributes()reports any path containing a non-ASCII character as nonexistent on Windows, unless the machine is configured for the UTF-8 pseudo-ANSI Code Page (65001). Linux and macOS are not affected.Unlike every other
lfsentry point that takes a path,get_mode()hands the UTF-8 bytes it receives from Lua straight tostd::filesysteminstead of going throughagi::fs::path, causing them to be misinterpreted as whatever encoding is specified by the system ACP.Beyond
lfs.attributes(path, "mode"), thelfs.attributes(path)signature is also affected, as it returns early whenget_mode()returns nil.This surfaced as a DependencyControl error when trying to install packages for Windows users whose account names contain non-ASCII characters: TypesettingTools/Aegisub-Motion#57
Reproduction: