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

ensure case sensitive paths #1369

Closed
wants to merge 3 commits into from
Closed

ensure case sensitive paths #1369

wants to merge 3 commits into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented May 19, 2024

closes #1367

  • fix on windows
  • refactor
  • test

@Fil Fil requested a review from mbostock May 19, 2024 16:15
Copy link
Member

@mbostock mbostock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is realpath the right API to check the case of the file name? realpath also resolves symbolic links; if the user is using symbolic links, this could cause a false positive.

Fil added a commit that referenced this pull request May 21, 2024
@Fil
Copy link
Contributor Author

Fil commented May 21, 2024

You're right, this does not work… and it can even create new problems. It comes from a wrong analysis of the root cause.

For example, if I have a single page that contains <img src=HORSE.jpg> and a horse.jpg file, the build is happy copying the file to _file/HORSE.xxxx.jpg and everything works. This PR would break that.

The issue in #1367 only arises when I add a second reference with <img src=horse.jpg>; in that case, one of the two links (either to _file/horse.xxxx.jpg or to _file/HORSE.xxxx.jpg) will fail in production, because we're only able, on a case-insensitive OS, to produce one of these two files.

So the fix must be completely different: see #1373

@Fil Fil closed this May 21, 2024
Fil added a commit that referenced this pull request May 21, 2024
@Fil Fil deleted the fil/case-sensitive branch May 21, 2024 11:23
Fil added a commit that referenced this pull request Sep 17, 2024
Fil added a commit that referenced this pull request Sep 17, 2024
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.

case sensitive file names
2 participants