Skip to content

Commit

Permalink
Merge pull request #2328 from AllenInstitute/bugfix/2328-create-globa…
Browse files Browse the repository at this point in the history
…l-settings-folder-if-not-present

CONF_GetSettingsPath: Create the global settings folder if required
  • Loading branch information
t-b authored Jan 22, 2025
2 parents be804f4 + 9089050 commit 16bd5a5
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 16bd5a5

Please sign in to comment.