arduino-libraries / SD

SD Library for Arduino
http://arduino.cc/
GNU General Public License v3.0
182 stars 155 forks source link

openNextFile does not correctly list files in use [imported] #15

Open agdl opened 8 years ago

agdl commented 8 years ago

From @cmaglie on November 15, 2012 18:55

This is Issue 904 moved from a Google Code project. Added by 2012-04-29T23:57:46.000Z by Srin...@gmail.com. Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, Component-Core, Component-SD, Milestone-1.0.2

Original description

What steps will reproduce the problem? Method A:

  1. Open the root of an SD card root = SD.open("/");
  2. List the files with the example code printDirectory(root,0); 2A. All files on card show up.
  3. Open a (different) file variable for writing SD.open("datafile.csv",FILE_WRITE);
  4. List the files with the example code printDirectory(root,0);
  5. File opened for writing does not show up from now till reset.

Method B:

  1. Open the root of an SD card root = SD.open("/");
  2. Open a (different) file variable for writing SD.open("datafile.csv",FILE_WRITE);
  3. List the files with the example code printDirectory(root,0);
  4. File opened for writing does not show up from now till reset.

What version of the Arduino software are you using? On what operating system? Which Arduino board are you using? Arduino 1.0 Windows 7 x64 Ultimate Arduino Uno SMD + Ethernet Shield R3 Kingston 1GB MicroSD Card in Ethernet Shield

Please provide any additional information below. Sample code and sample output attached.

Copied from original issue: arduino/Arduino#904