Skip to content

Commit afa0edd

Browse files
committed
Update to follow refactoring of info
now it use struct instead of integer
1 parent 627052c commit afa0edd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

esp8266/webinterface.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,13 +2695,12 @@ void handleFileList() {
26952695
}
26962696
jsonfile+="],";
26972697
jsonfile+="\"status\":\"" + status + "\",";
2698-
uint32_t total;
2699-
uint32_t used;
2700-
SPIFFS.info(&total,&used);
2701-
jsonfile+="\"total\":\"" + formatBytes(total) + "\",";
2702-
jsonfile+="\"used\":\"" + formatBytes(used) + "\",";
2698+
FSInfo info;
2699+
SPIFFS.info(info);
2700+
jsonfile+="\"total\":\"" + formatBytes(info.totalBytes) + "\",";
2701+
jsonfile+="\"used\":\"" + formatBytes(info.usedBytes) + "\",";
27032702
jsonfile+="\"occupation\":\"" ;
2704-
jsonfile+= intTostr(100*used/total);
2703+
jsonfile+= intTostr(100*info.usedBytes/info.totalBytes);
27052704
jsonfile+="\"";
27062705
jsonfile+="}";
27072706
path = "";

0 commit comments

Comments
 (0)