refactor parameter to overwriteExisting

This commit is contained in:
Nnoggie
2024-06-25 17:34:16 +02:00
committed by andrew6180
parent fa60359e2c
commit 2749a0a91d
+3 -3
View File
@@ -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)