mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-01-09 15:59:09 +00:00
fix(lib): error while attempting to migrate when new dir exists
This commit is contained in:
parent
76e434ec6d
commit
773cc1b2a1
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ local LINK_INSTALL_DIR = (dirs.homeDir() or error("Couldn't get home dir :(")):j
|
|||
local TOOL_STORAGE_DIR = LINK_INSTALL_DIR:join(".tool_storage")
|
||||
|
||||
local OLD_TOOL_STORAGE_DIR = LINK_INSTALL_DIR:join("tool_storage")
|
||||
if pathfs.isDir(OLD_TOOL_STORAGE_DIR) then
|
||||
if pathfs.isDir(OLD_TOOL_STORAGE_DIR) and not pathfs.isDir(TOOL_STORAGE_DIR) then
|
||||
-- TODO: Merge both directories into one instead of a single move
|
||||
pathfs.move(OLD_TOOL_STORAGE_DIR, TOOL_STORAGE_DIR)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue