PaulStoffregen / SD

70 stars 41 forks source link

Have the getModifyTime/create... check for SDFat returning 0's #39

Closed KurtE closed 2 years ago

KurtE commented 2 years ago

@PaulStoffregen @mjs513

If they return 0, we bail and return false. This implied that no date/time was found, and or calling code was blindly using the values like month of 255...

This avoids/fixes issue with the SD listfiles faulting if SDFat returned 0s for date and time we translate for example month to 255, which we index and try to print...

Feels cleaner than hacking it in the sketch code

PaulStoffregen commented 2 years ago

Thanks!