File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/
10
10
The SD library allows for reading from and writing to SD cards.
11
11
12
12
For more information about this library please visit us at
13
- http://www.arduino.cc/en/Reference/repository-name}
13
+ http://www.arduino.cc/en/Reference/{ repository-name}
Original file line number Diff line number Diff line change @@ -587,7 +587,6 @@ namespace SDLib {
587
587
588
588
// Serial.print("\t\treading dir...");
589
589
while (_file->readDir (&p) > 0 ) {
590
-
591
590
// done if past last used entry
592
591
if (p.name [0 ] == DIR_NAME_FREE) {
593
592
// Serial.println("end");
@@ -607,14 +606,16 @@ namespace SDLib {
607
606
}
608
607
609
608
// print file name with possible blank fill
610
- SdFile f;
611
- char name[13 ];
612
- _file->dirName (p, name);
613
609
// Serial.print("try to open file ");
614
610
// Serial.println(name);
615
611
616
- if (f.open (_file, name, mode)) {
612
+ SdFile f;
613
+ uint16_t index = (_file->curPosition () - sizeof (dir_t ) ) >> 5 ;
614
+
615
+ if (f.open (_file, index , mode)) {
617
616
// Serial.println("OK!");
617
+ char name[13 ];
618
+ _file->dirName (p, name);
618
619
return File (f, name);
619
620
} else {
620
621
// Serial.println("ugh");
You can’t perform that action at this time.
0 commit comments