Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VFS is returning lower-case values for mixed-case paths #1

Open
bobbystacksmash opened this issue Jun 24, 2018 · 1 comment
Open

VFS is returning lower-case values for mixed-case paths #1

bobbystacksmash opened this issue Jun 24, 2018 · 1 comment

Comments

@bobbystacksmash
Copy link
Owner

bobbystacksmash commented Jun 24, 2018

The VFS should perform case-insensitive actions, which it seems to do. However, when querying the file system using methods which return string-paths for file/folder names, the names are returned in lower-case only, even for mixed-case file/folders. For example:

We add the folder FooBar:
vfs.AddFolder("C:\\Hello\\FooBar");

When fetching this file, FooBar becomes foobar:
vfs.FindFiles("C:\\Hello", "FooBar"); // => ["foobar"]

While this isn't technically a problem because Windows' FS handling is case-insensitive by default, it's conceivable that usercode may expect the case to be returned correctly (such as string comparisons for file/folder paths).

@bobbystacksmash
Copy link
Owner Author

A technique which may be applicable here was done in runtime/virtreg.js. See the resolve_path method which uses a dictionary to map original keys to their normalised values.

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

No branches or pull requests

1 participant