Pages: [1]   Go Down
Author Topic: Bug in SD library Example code (with fix)  (Read 655 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The listfiles example will fail if you have more than 26 files because it fails to close the files and you run out of file handles.
I discovered this, not by having too many files, but by rewinding the directory as I was scrolling through the files with an LCD GUI.

It's a simple fix, just make sure you close the files when iterating over a directory.

I filed a bug:
and the fixed example is:

I also did a pull to the adafruit repository version, but I'm not sure if that's active because there's been no response.

Pages: [1]   Go Up
Jump to: