Merge pull request #398 from stklcode/fix/393-sd-filenames
use longest_filename() for SD card files instead of longFilename
This commit is contained in:
@@ -1190,7 +1190,9 @@
|
|||||||
else {
|
else {
|
||||||
card.selectFileByIndex(count - 1);
|
card.selectFileByIndex(count - 1);
|
||||||
|
|
||||||
int fileNameLen = strlen(card.longFilename);
|
// THe longname may not be filed, so we use the built-in fallback here.
|
||||||
|
char* fileName = card.longest_filename();
|
||||||
|
int fileNameLen = strlen(fileName);
|
||||||
bool fileNameWasCut = false;
|
bool fileNameWasCut = false;
|
||||||
|
|
||||||
// Cut off too long filenames.
|
// Cut off too long filenames.
|
||||||
@@ -1211,7 +1213,7 @@
|
|||||||
outputString[i] = ' ';
|
outputString[i] = ' ';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
outputString[i] = card.longFilename[i];
|
outputString[i] = fileName[i];
|
||||||
if (!isPrintable(outputString[i]))
|
if (!isPrintable(outputString[i]))
|
||||||
outputString[i] = '_';
|
outputString[i] = '_';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user