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