mirror of https://github.com/arendst/Tasmota.git
Update xdrv_50_filesystem.ino
This commit is contained in:
parent
2852552fda
commit
e64ee7b13f
|
@ -348,6 +348,11 @@ bool TfsLoadFile(const char *fname, uint8_t *buf, uint32_t len) {
|
|||
AddLog(LOG_LEVEL_INFO, PSTR("TFS: File '%s' not found"), fname +1); // Skip leading slash
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t flen = file.size();
|
||||
if (len > flen){
|
||||
len = flen;
|
||||
}
|
||||
|
||||
file.read(buf, len);
|
||||
file.close();
|
||||
|
|
Loading…
Reference in New Issue