File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,16 @@ bool VFSImpl::rmdir(const char *path)
183
183
log_e (" File system is not mounted" );
184
184
return false ;
185
185
}
186
-
187
186
VFSFileImpl f (this , path, " r" );
188
- if (!f || !f.isDirectory ()) {
187
+ if (!f || !f.isDirectory () || _mountpoint == " /spiffs" ) {
188
+ if (_mountpoint == " /spiffs" ) {
189
+ log_e (" rmdir is unnecessary in SPIFFS" );
190
+ } else {
191
+ log_e (" %s does not exists or is a file" , path);
192
+ }
189
193
if (f) {
190
194
f.close ();
191
195
}
192
- log_e (" %s does not exists or is a file" , path);
193
196
return false ;
194
197
}
195
198
f.close ();
@@ -200,7 +203,7 @@ bool VFSImpl::rmdir(const char *path)
200
203
return false ;
201
204
}
202
205
sprintf (temp," %s%s" , _mountpoint, path);
203
- auto rc = unlink (temp);
206
+ auto rc = rmdir (temp);
204
207
free (temp);
205
208
return rc == 0 ;
206
209
}
You can’t perform that action at this time.
0 commit comments