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

case sensitive file names #1367

Open
Fil opened this issue May 17, 2024 · 3 comments · May be fixed by #1374
Open

case sensitive file names #1367

Fil opened this issue May 17, 2024 · 3 comments · May be fixed by #1374
Assignees
Labels
bug Something isn’t working enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented May 17, 2024

Preview is (most often?) case insensitive, but hosting can be case sensitive. A file attachment named AAPL.csv might be correctly resolved in preview and build, but fail in production.

I'd suggest we make preview and build case sensitive, or (maybe better) we lowercase all filenames.

@Fil Fil added bug Something isn’t working enhancement New feature or request labels May 17, 2024
@mbostock
Copy link
Member

I think this is your operating system (macOS) being case insensitive rather than preview and I don’t think we should do anything here. Forcing all files to be lowercase would likely cause other problems.

@Fil
Copy link
Contributor Author

Fil commented May 17, 2024

True, forcing all files to be lowercase is a bad idea (we don't want to have to rewrite scripts that expect to load a file called SoMeThInG.js).

I still think preview (or, and more importantly, build) should help the user catch the issue and break—rather than discovering it in production.

This might mean that we need to compare the list of actual file names ([aapl.csv] in this case) with the list of expected file names ([AAPL.csv])? Needs a bit of investigation.

@mbostock
Copy link
Member

Yeah we could do some validation during build since we have the full list of files then, and warn if the file cases don’t match what the operating system says when you readdir recursive.

@Fil Fil self-assigned this May 17, 2024
Fil added a commit that referenced this issue May 19, 2024
@Fil Fil mentioned this issue May 19, 2024
3 tasks
Fil added a commit that referenced this issue May 21, 2024
Fil added a commit that referenced this issue May 21, 2024
@Fil Fil linked a pull request May 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working enhancement New feature or request
Projects
None yet
2 participants