From 773cc1b2a137c54c2a9814f8d4bc79ced51f1e74 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sun, 22 Dec 2024 15:59:27 +0000 Subject: [PATCH] fix(lib): error while attempting to migrate when new dir exists --- toolchainlib/src/init.luau | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchainlib/src/init.luau b/toolchainlib/src/init.luau index a815040..acab0d8 100644 --- a/toolchainlib/src/init.luau +++ b/toolchainlib/src/init.luau @@ -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