|
@@ -185,7 +185,7 @@ int CardReader::countItems(SdFile dir) {
|
185
|
185
|
while (dir.readDir(&p, longFilename) > 0)
|
186
|
186
|
c += is_dir_or_gcode(p);
|
187
|
187
|
|
188
|
|
- #if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
|
|
188
|
+ #if ALL(SDCARD_SORT_ALPHA, SDSORT_USES_RAM, SDSORT_CACHE_NAMES)
|
189
|
189
|
nrFiles = c;
|
190
|
190
|
#endif
|
191
|
191
|
|
|
@@ -430,7 +430,9 @@ void CardReader::release() {
|
430
|
430
|
endFilePrint();
|
431
|
431
|
flag.mounted = false;
|
432
|
432
|
flag.workDirIsRoot = true;
|
433
|
|
- nrFiles = 0;
|
|
433
|
+ #if ALL(SDCARD_SORT_ALPHA, SDSORT_USES_RAM, SDSORT_CACHE_NAMES)
|
|
434
|
+ nrFiles = 0;
|
|
435
|
+ #endif
|
434
|
436
|
}
|
435
|
437
|
|
436
|
438
|
void CardReader::openAndPrintFile(const char *name) {
|