Update sd_sdfat2_esp32.cpp

This commit is contained in:
Luc 2022-07-01 21:25:03 +08:00
parent ab9f3c1236
commit fcbcf63326

View File

@ -324,7 +324,7 @@ ESP_SDFile ESP_SD::open(const char* path, uint8_t mode)
File tmp = SD.open(path, (mode == ESP_FILE_READ)?FILE_READ:(mode == ESP_FILE_WRITE)?FILE_WRITE:FILE_WRITE);
if(tmp) {
ESP_SDFile esptmp(&tmp,strcmp(path,"/") == 0?true: tmp.isDir(),(mode == ESP_FILE_READ)?false:true, path);
log_esp3d("%s is a %s",strcmp(path,"/") == 0?true: tmp.isDir()?"Dir":"File");
log_esp3d("%s is a %s",path, tmp.isDir()?"Dir":"File");
return esptmp;
} else {
log_esp3d("open %s failed", path);