|
|
@ -217,9 +217,10 @@ end
|
|
|
|
--- Checks the history list for deleted files and removes history items respectively.
|
|
|
|
--- Checks the history list for deleted files and removes history items respectively.
|
|
|
|
function ReadHistory:clearMissing()
|
|
|
|
function ReadHistory:clearMissing()
|
|
|
|
local history_updated
|
|
|
|
local history_updated
|
|
|
|
for i, v in ipairs(self.hist) do
|
|
|
|
for i = #self.hist, 1, -1 do
|
|
|
|
if v.file == nil or lfs.attributes(v.file, "mode") ~= "file" then
|
|
|
|
local file = self.hist[i].file
|
|
|
|
self:removeItem(v, i, true) -- no flush
|
|
|
|
if file == nil or lfs.attributes(file, "mode") ~= "file" then
|
|
|
|
|
|
|
|
self:removeItem(self.hist[i], i, true) -- no flush
|
|
|
|
history_updated = true
|
|
|
|
history_updated = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|