mirror of https://github.com/arendst/Tasmota.git
Update xdrv_50_filesystem.ino
This commit is contained in:
parent
2852552fda
commit
e64ee7b13f
|
@ -349,6 +349,11 @@ bool TfsLoadFile(const char *fname, uint8_t *buf, uint32_t len) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t flen = file.size();
|
||||||
|
if (len > flen){
|
||||||
|
len = flen;
|
||||||
|
}
|
||||||
|
|
||||||
file.read(buf, len);
|
file.read(buf, len);
|
||||||
file.close();
|
file.close();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue