Fix T92577: Cannot open shortcut folders on Windows

`file.select()` wasn't handling redirects as it should when it also
opens directories. This was only uncovered by a change in the keymap.

Reviewed By: Bastien Montagne, Harley Acheson

Differential Revision: https://developer.blender.org/D13388
This commit is contained in:
Julian Eisel 2021-11-30 11:24:36 +01:00 committed by Julian Eisel
parent d8edc2c634
commit 2e53f8b4b1
Notes: blender-bot 2023-02-14 02:27:56 +01:00
Referenced by issue #92577, Blender 3.0 beta Cannot open folder shortcuts under Windows
1 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,11 @@ static FileSelect file_select_do(bContext *C, int selected_idx, bool do_diropen)
filelist_setrecursion(sfile->files, params->recursion_level);
}
}
else if (file->redirection_path) {
BLI_strncpy(params->dir, file->redirection_path, sizeof(params->dir));
BLI_path_normalize_dir(BKE_main_blendfile_path(bmain), params->dir);
BLI_path_slash_ensure(params->dir);
}
else {
BLI_path_normalize_dir(BKE_main_blendfile_path(bmain), params->dir);
strcat(params->dir, file->relpath);