Add back the filter for smoothieware for subfolder

using M20 ESP3D cache
This commit is contained in:
luc lebosse 2017-03-30 22:01:58 +02:00
parent f26e3c2608
commit 4d8012d2f7

View File

@ -3403,7 +3403,7 @@ void handleSDFileList()
LOG( CONFIG::formatBytes(ssize.toInt())); LOG( CONFIG::formatBytes(ssize.toInt()));
} }
#endif #endif
#if FIRMWARE_TARGET == MARLIN || FIRMWARE_TARGET == MARLINKIMBRA || FIRMWARE_TARGET == SMOOTHIEWARE #if FIRMWARE_TARGET == MARLIN || FIRMWARE_TARGET == MARLINKIMBRA
jsonfile+=sname; jsonfile+=sname;
jsonfile+="\",\"size\":\""; jsonfile+="\",\"size\":\"";
LOG(String(i+1)); LOG(String(i+1));
@ -3416,6 +3416,20 @@ void handleSDFileList()
jsonfile+=""; jsonfile+="";
// } // }
LOG("\r\n"); 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 #endif
jsonfile+="\"}"; jsonfile+="\"}";
} }