Fix fatFS upload thanks @liqijian101

This commit is contained in:
Luc 2021-10-29 22:00:52 +08:00
parent 254f128940
commit 972b4dbe33
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H
//version and sources location
#define FW_VERSION "3.0.0.a106"
#define FW_VERSION "3.0.0.a107"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H

View File

@ -257,7 +257,8 @@ void ESP_File::close()
//reopen if mode = write
//udate size + date
if (_iswritemode && !_isdir) {
File ftmp = FFat.open(_filename.c_str());
String s = _filename[0]=='/'?"":"/" + _filename;
File ftmp = FFat.open(s.c_str());
if (ftmp) {
_size = ftmp.size();
_lastwrite = ftmp.getLastWrite();