diff --git a/esp3d/webinterface.cpp b/esp3d/webinterface.cpp index 5de66a3b..ee859eb7 100644 --- a/esp3d/webinterface.cpp +++ b/esp3d/webinterface.cpp @@ -3403,7 +3403,7 @@ void handleSDFileList() LOG( CONFIG::formatBytes(ssize.toInt())); } #endif -#if FIRMWARE_TARGET == MARLIN || FIRMWARE_TARGET == MARLINKIMBRA || FIRMWARE_TARGET == SMOOTHIEWARE +#if FIRMWARE_TARGET == MARLIN || FIRMWARE_TARGET == MARLINKIMBRA jsonfile+=sname; jsonfile+="\",\"size\":\""; LOG(String(i+1)); @@ -3416,6 +3416,20 @@ void handleSDFileList() jsonfile+=""; // } LOG("\r\n"); +#endif +#if FIRMWARE_TARGET == SMOOTHIEWARE + jsonfile+=sname; + jsonfile+="\",\"size\":\""; + LOG(String(i+1)); + LOG(sname); + if (sname[0] == '/' || sname[sname.length()-1]=='/') { + jsonfile+="-1"; + LOG(" -1"); + } else { + //nothing to add + jsonfile+=""; + } + LOG("\r\n"); #endif jsonfile+="\"}"; }