File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,6 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
413
413
}
414
414
/** Directory entry is for a file or subdirectory */
415
415
static inline uint8_t DIR_IS_FILE_OR_SUBDIR (const dir_t * dir ) {
416
- return (dir -> attributes & DIR_ATT_VOLUME_ID ) == 0 ;
416
+ return (dir -> attributes & ( DIR_ATT_VOLUME_ID | DIR_ATT_SYSTEM | DIR_ATT_HIDDEN ) ) == 0 ;
417
417
}
418
418
#endif // FatStructs_h
Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ class SdFile : public Print {
437
437
438
438
// private data
439
439
uint8_t flags_; // See above for definition of flags_ bits
440
- uint8_t type_; // type of file see above for values
440
+ uint8_t volatile type_; // type of file see above for values
441
441
uint32_t curCluster_; // cluster for current file position
442
442
uint32_t curPosition_; // current file position in bytes from beginning
443
443
uint32_t dirBlock_; // SD block that contains directory entry for file
Original file line number Diff line number Diff line change @@ -303,19 +303,19 @@ uint8_t SdFile::make83Name(const char* str, uint8_t* name) {
303
303
// illegal FAT characters
304
304
uint8_t b;
305
305
#if defined(__AVR__)
306
- PGM_P p = PSTR (" |<>^ +=?/[];,*\"\\ " );
306
+ PGM_P p = PSTR (" |<>: +=?/[];,*\"\\ " );
307
307
while ((b = pgm_read_byte (p++))) if (b == c) {
308
308
return false ;
309
309
}
310
310
#elif defined(__arm__)
311
- const uint8_t valid[] = " |<>^ +=?/[];,*\"\\ " ;
311
+ const uint8_t valid[] = " |<>: +=?/[];,*\"\\ " ;
312
312
const uint8_t *p = valid;
313
313
while ((b = *p++)) if (b == c) {
314
314
return false ;
315
315
}
316
316
#endif
317
317
// check size and only allow ASCII printable characters
318
- if (i > n || c < 0X21 || c > 0X7E ) {
318
+ if (i > n || c < 0x20 || c == 0x7F ) {
319
319
return false ;
320
320
}
321
321
// only upper case allowed in 8.3 names - convert lower to upper
@@ -1041,7 +1041,7 @@ uint8_t SdFile::rmRfStar(void) {
1041
1041
}
1042
1042
1043
1043
// skip if part of long file name or volume label in root
1044
- if (! DIR_IS_FILE_OR_SUBDIR (p) ) {
1044
+ if (p-> attributes & DIR_ATT_VOLUME_ID ) {
1045
1045
continue ;
1046
1046
}
1047
1047
You can’t perform that action at this time.
0 commit comments