Fix file browser navigation for non-ASCII folder names#178
Merged
daveallie merged 1 commit intocrosspoint-reader:masterfrom Dec 30, 2025
Merged
Conversation
…II names - Enable UTF-8 long file names in SdFat (USE_UTF8_LONG_NAMES=1) - Add directory validation before iterating files - Add rewindDirectory() call for stability
gebeto
reviewed
Dec 30, 2025
Comment on lines
+35
to
+36
| if (!root || !root.isDirectory()) { | ||
| if (root) root.close(); |
There was a problem hiding this comment.
this check looks strange
- if outer "if" will not pass, then inner "if" will be not checked
- if outer "if" will pass, then inner "if" not pass
This just doesn't make sense
There was a problem hiding this comment.
also !root.isDirectory will panic if root will be null, so need to do something like that:
if (!root || (root && !root.isDirectory()) {or am I missing something?
Member
There was a problem hiding this comment.
It looks fine to me:
root set and is directory
if (false || false) {
... ignored ...
}root set and is not directory
if (false || true) {
if (true) root.close();
return;
}root not set
if (true || ...this is not checked as the if early returns...) {
if (false) root.close();
return;
}To get past the || condition in the if, root must be set, so root.isDirectory() should not crash
There was a problem hiding this comment.
Ahhh, I see, thanks for explanation!
Damn, it was confusing 🙈
Contributor
Author
There was a problem hiding this comment.
@daveallie Thanks for explaining it instead. That’s exactly right!
daveallie
approved these changes
Dec 30, 2025
Unintendedsideeffects
pushed a commit
to Unintendedsideeffects/crosspoint-reader
that referenced
this pull request
Feb 17, 2026
…ader#178) ## Summary * **What is the goal of this PR?** Fix file browser failing to navigate into subdirectories with non-ASCII (Korean/Unicode) folder names. * **What changes are included?** - Enable UTF-8 long file names in SdFat (`USE_UTF8_LONG_NAMES=1`) - Add directory validation before iterating files - Add `rewindDirectory()` call for stability ## Additional Context
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.
Summary
Fix file browser failing to navigate into subdirectories with non-ASCII (Korean/Unicode) folder names.
USE_UTF8_LONG_NAMES=1)rewindDirectory()call for stabilityAdditional Context