upgrade
This commit is contained in:
@@ -40,15 +40,17 @@ function DBAttachment.releaseTimeout()
|
||||
end
|
||||
|
||||
-- 删掉超时的文件
|
||||
local files = FileEx.GetFiles(downloadDir)
|
||||
local count = files.Length
|
||||
for i = 0, count - 1 do
|
||||
---@type System.IO.FileInfo
|
||||
local fi = FileInfo(files[i])
|
||||
if fi then
|
||||
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
|
||||
if diff > _TimeOutSec then
|
||||
FileEx.Delete(files[i])
|
||||
if Directory.Exists(downloadDir) then
|
||||
local files = FileEx.GetFiles(downloadDir)
|
||||
local count = files.Length
|
||||
for i = 0, count - 1 do
|
||||
---@type System.IO.FileInfo
|
||||
local fi = FileInfo(files[i])
|
||||
if fi then
|
||||
local diff = (DateTime.Now:ToFileTime() - fi.LastAccessTime:ToFileTime()) / 10000
|
||||
if diff > _TimeOutSec then
|
||||
FileEx.Delete(files[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user