remove missing files
This commit is contained in:
parent
b5586fcf6e
commit
3ddffc15a9
@ -585,11 +585,12 @@ M.clean = function()
|
|||||||
|
|
||||||
local files = scan.scan_dir(haven_config.haven_path, {hidden = true, depth = 1})
|
local files = scan.scan_dir(haven_config.haven_path, {hidden = true, depth = 1})
|
||||||
for _, name in ipairs(files) do
|
for _, name in ipairs(files) do
|
||||||
|
local original_path = Path:new(name)
|
||||||
name = decode(Path:new(name):make_relative(haven_config.haven_path)):sub(1, -6)
|
name = decode(Path:new(name):make_relative(haven_config.haven_path)):sub(1, -6)
|
||||||
local p = Path:new(name)
|
local p = Path:new(name)
|
||||||
if not p:exists() then
|
if not p:exists() then
|
||||||
print("removing:" .. p:absolute())
|
print("removing: " .. original_path:absolute())
|
||||||
p:rm()
|
original_path:rm()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user