0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2025-01-03 08:13:49 +01:00

Fix cleanup in info/logfiles api.

This commit is contained in:
Wouter R 2013-10-10 17:17:23 +02:00
parent 6e80ca8aa2
commit 43eaab4cbf

View File

@ -74,14 +74,12 @@ function M.logfiles(request, response)
--[[ remove temporary files ]]-- --[[ remove temporary files ]]--
if ultip and ultip == 'directory' then for file in lfs.dir(LOG_COLLECT_DIR) do
for file in lfs.dir(ULTIFI_PATH) do if file:find(PRINT3D_LOG_FILENAME_PREFIX) == 1 and file:find(PRINT3D_LOG_FILENAME_SUFFIX) ~= nil then
if file ~= '.' and file ~= '..' then local tgtLogFile = LOG_COLLECT_DIR .. '/' .. file
local tgtLogFile = LOG_COLLECT_DIR .. '/' .. file .. '-' .. ULTIFI_LOG_FILENAME
local rv,sig,code = redirectedExecute('rm ' .. tgtLogFile) local rv,sig,code = redirectedExecute('rm ' .. tgtLogFile)
end end
end end
end
local rv,sig,code = redirectedExecute('rm ' .. LOG_COLLECT_DIR .. '/' .. WIFIBOX_LOG_FILENAME) local rv,sig,code = redirectedExecute('rm ' .. LOG_COLLECT_DIR .. '/' .. WIFIBOX_LOG_FILENAME)