diff options
author | Julian Eisel <Severin> | 2021-11-30 13:24:36 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-11-30 13:29:40 +0300 |
commit | 2e53f8b4b13186ef9ca04e1979c548ea1acdc763 (patch) | |
tree | 8ddef39abbc558b1acd556cc5a84b63f62dd8b9c | |
parent | d8edc2c6345306b943d73d2806bea18b67c66bc3 (diff) |
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
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 15bb7917924..ab11d5c0330 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -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); |