Fix #112599: Blender freezes for half a minute when opening File Browser

The delay is caused by `Shortcut->Resolve(0, SLR_NO_UI | SLR_UPDATE)`
to locate potentially moved or renamed paths.

The issue was resolved by adding the `SLR_NOSEARCH` flag.

This eliminates the delay without sacrificing functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/116692
This commit is contained in:
Germano Cavalcante 2024-01-03 18:26:23 +01:00
parent d2e91fb0d7
commit 81017772f5
1 changed files with 1 additions and 1 deletions

View File

@ -322,7 +322,7 @@ bool BLI_file_alias_target(const char *filepath,
if (conv_utf_8_to_16(filepath, path_utf16, ARRAY_SIZE(path_utf16)) == 0) {
hr = PersistFile->Load(path_utf16, STGM_READ);
if (SUCCEEDED(hr)) {
hr = Shortcut->Resolve(0, SLR_NO_UI | SLR_UPDATE);
hr = Shortcut->Resolve(0, SLR_NO_UI | SLR_UPDATE | SLR_NOSEARCH);
if (SUCCEEDED(hr)) {
wchar_t target_utf16[FILE_MAXDIR] = {0};
hr = Shortcut->GetPath(target_utf16, FILE_MAXDIR, NULL, 0);