Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed case-insensitive name check in checkSketchFile #11554

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

Open
magedrifaat wants to merge 1 commit into arduino:master
base: master
Choose a base branch
Loading
from magedrifaat:case-sensitivity-bug

Conversation

@magedrifaat
Copy link
Contributor

@magedrifaat magedrifaat commented May 22, 2021

This commit fixes #8030

It turns out that on case-insensitive file systems, the "file.exists" check will return true even if the file that actually exists differs from the file being checked in the case of the letters. (i.e. "Test.ino" will be considered to exist even if the actual file name is "test.ino").
The proposed solution is to make use of the function getCanonicalFile as suggested in this StackOverflow answer to get the actual file name and compare it to the expected name.

I decided to implement a function in FileUtils for better code reuse but it could have been inlined as well since this is its only use-case currently.

All Submissions:

  • [ x ] Have you followed the guidelines in our Contributing document?
  • [ x ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Core Features:

  • [ x ] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ x ] Have you successfully ran tests with your changes

Copy link

CLAassistant commented May 22, 2021
edited
Loading

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Case difference in the sketch folder and file name causes the IDE to try to compile the wrong file

AltStyle によって変換されたページ (->オリジナル) /