Fix #123471: Ensure Trailing Slash for Default Folder Path

In file_browse_invoke, if the path is blank we attempt to use
BKE_appdir_folder_default_or_root to get the user's normal document
root.  However we are not ensuring that the directory path has a
trailing slash, which can result in it being misinterpreted as a file
path instead, separating out the last path part. This PR only adds a
call to BLI_path_slash_ensure.

Pull Request: https://projects.blender.org/blender/blender/pulls/123504
This commit is contained in:
Harley Acheson 2024-06-20 19:30:18 +02:00 committed by Harley Acheson
parent 6161cc183e
commit 6ef2e6f606

@ -371,6 +371,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event)
else {
MEM_freeN(path);
path = BLI_strdup(BKE_appdir_folder_default_or_root());
BLI_path_slash_ensure(path, FILE_MAXDIR);
}
}