|
@@ -95,9 +95,11 @@ void CardReader::lsDive(const char *prepend,SdFile parent)
|
95
|
95
|
if ( p.name[1] != '.')
|
96
|
96
|
continue;
|
97
|
97
|
}
|
|
98
|
+
|
98
|
99
|
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
|
99
|
100
|
filenameIsDir=DIR_IS_SUBDIR(&p);
|
100
|
101
|
|
|
102
|
+
|
101
|
103
|
if(!filenameIsDir)
|
102
|
104
|
{
|
103
|
105
|
if(p.name[8]!='G') continue;
|
|
@@ -163,20 +165,26 @@ void CardReader::initsd()
|
163
|
165
|
SERIAL_ECHO_START;
|
164
|
166
|
SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
|
165
|
167
|
}
|
|
168
|
+ workDir=root;
|
166
|
169
|
curDir=&root;
|
|
170
|
+ /*
|
167
|
171
|
if(!workDir.openRoot(&volume))
|
168
|
172
|
{
|
169
|
173
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
170
|
174
|
}
|
|
175
|
+ */
|
|
176
|
+
|
171
|
177
|
}
|
172
|
178
|
|
173
|
179
|
void CardReader::setroot()
|
174
|
180
|
{
|
175
|
|
- curDir=&root;
|
176
|
|
- if(!workDir.openRoot(&volume))
|
|
181
|
+ /*if(!workDir.openRoot(&volume))
|
177
|
182
|
{
|
178
|
183
|
SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
|
179
|
|
- }
|
|
184
|
+ }*/
|
|
185
|
+ workDir=root;
|
|
186
|
+
|
|
187
|
+ curDir=&workDir;
|
180
|
188
|
}
|
181
|
189
|
void CardReader::release()
|
182
|
190
|
{
|