From 4d8012d2f7dfce1435411081ab595bd4671b997a Mon Sep 17 00:00:00 2001 From: luc lebosse Date: Thu, 30 Mar 2017 22:01:58 +0200 Subject: [PATCH] Add back the filter for smoothieware for subfolder using M20 ESP3D cache --- esp3d/webinterface.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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+="\"}"; }