Skip to content

Commit a7f0e1b

Browse files
committed
Few small fixes
1 parent 14eed93 commit a7f0e1b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

squid/system_helper.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
---@field is_debug boolean
55
local SystemHelper = {}
66

7+
-- localize
8+
local sys, io, os, tonumber, ipairs = sys, io, os, tonumber, ipairs
9+
710
local system_name = sys.get_sys_info().system_name
811

912
SystemHelper.is_linux = system_name == "Linux"
@@ -148,18 +151,8 @@ function SystemHelper.remove_old_files_by_filename(files_table, directory, days_
148151
local file_age_days = os.difftime(current_time, file_timestamp) / (60 * 60 * 24)
149152
if file_age_days > days_threshold then
150153
-- Remove the file if it's older than the threshold
151-
--local success, err =
152154
os.remove(file_path)
153-
--[[if success then
154-
print("Removed old file:", file_path)
155-
else
156-
print("Error removing file:", file_path, err)
157-
end]]
158-
--else
159-
--print("File is not old enough to remove:", file_path)
160155
end
161-
--else
162-
--print("Skipping file due to invalid timestamp:", file_name)
163156
end
164157
end
165158
end

0 commit comments

Comments
 (0)