Skip to content

Commit

Permalink
CONF_GetSettingsPath: Create the global settings folder if required
Browse files Browse the repository at this point in the history
This is nicer for the user. Although that folder should always exist.
  • Loading branch information
t-b committed Jan 20, 2025
1 parent 86bdadf commit 9089050
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Packages/MIES/MIES_Configuration.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -369,19 +369,20 @@ static Function/S CONF_GetSettingsPath(variable type)

path = RemoveListItem(numItems - 1, path, ":")
path = RemoveListItem(numItems - 2, path, ":") + EXPCONFIG_SETTINGS_FOLDER + ":"
ASSERT(FolderExists(path), "Unable to resolve MIES Settings folder path. Is it present and readable in Packages\\Settings ?")

break
case CONF_AUTO_LOADER_USER:
path = CONF_AUTO_LOADER_USER_PATH
if(!FolderExists(path))
CreateFolderOnDisk(path)
endif
break
default:
ASSERT(0, "Invalid type parameter")
break
endswitch

if(!FolderExists(path))
CreateFolderOnDisk(path)
endif

if(FolderExists(path))
symbPath = "PathSettings"
NewPath/O/Q $symbPath, path
Expand Down

0 comments on commit 9089050

Please sign in to comment.