A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix file browser navigation for non-ASCII folder names (#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

authored by

Eunchurn Park and committed by
GitHub
93226c9f 941643cf

+10
+2
platformio.ini
··· 26 26 -DXML_GE=0 27 27 -DXML_CONTEXT_BYTES=1024 28 28 -std=c++2a 29 + # Enable UTF-8 long file names in SdFat 30 + -DUSE_UTF8_LONG_NAMES=1 29 31 30 32 ; Board configuration 31 33 board_build.flash_mode = dio
+8
src/activities/reader/FileSelectionActivity.cpp
··· 30 30 void FileSelectionActivity::loadFiles() { 31 31 files.clear(); 32 32 selectorIndex = 0; 33 + 33 34 auto root = SdMan.open(basepath.c_str()); 35 + if (!root || !root.isDirectory()) { 36 + if (root) root.close(); 37 + return; 38 + } 39 + 40 + root.rewindDirectory(); 41 + 34 42 char name[128]; 35 43 for (auto file = root.openNextFile(); file; file = root.openNextFile()) { 36 44 file.getName(name, sizeof(name));