From 2749a0a91d35a8bc07ea3acd7cd77dd6b64a7670 Mon Sep 17 00:00:00 2001 From: Nnoggie <27819512+Nnoggie@users.noreply.github.com> Date: Tue, 25 Jun 2024 17:34:16 +0200 Subject: [PATCH] refactor parameter to overwriteExisting --- functions/profiles.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/profiles.lua b/functions/profiles.lua index d82253d8..ba6f4cbf 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1742,9 +1742,9 @@ end ---@param newProfileName string ---@param bImportAutoRunCode boolean ---@param bIsFromImportPrompt boolean ----@param overwriteProfile boolean --if the profile already exists, overwrite it +---@param overwriteExisting boolean ---@return boolean -function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCode, bIsFromImportPrompt, overwriteProfile) +function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCode, bIsFromImportPrompt, overwriteExisting) if (not newProfileName or type(newProfileName) ~= "string" or string.len(newProfileName) < 2) then Details:Msg("invalid profile name or profile name is too short.") --localize-me return false @@ -1758,7 +1758,7 @@ function Details:ImportProfile (profileString, newProfileName, bImportAutoRunCod local profileObject = Details:GetProfile (newProfileName, false) local nameWasDuplicate = false - if not overwriteProfile then + if not overwriteExisting then while(profileObject) do newProfileName = newProfileName .. '2'; profileObject = Details:GetProfile(newProfileName, false)