Esme Povirk (@madewokherd) commented about dlls/comdlg32/navbar.c:
+ + /* expand variables */ + expanded_cch = ExpandEnvironmentStringsW(text, NULL, 0); + if (!expanded_cch) + goto cleanup; + + expanded = HeapAlloc(GetProcessHeap(), 0, expanded_cch * sizeof(WCHAR)); + if (!expanded) + goto cleanup; + + expanded_cch = ExpandEnvironmentStringsW(text, expanded, expanded_cch); + if (!expanded_cch) + goto cleanup; + + /* check if we have a valid path */ + if (GetFileAttributesW(expanded) == INVALID_FILE_ATTRIBUTES) This doesn't seem right, as it doesn't account for relative paths or for typing in things like "Recycle Bin". It may work as a first step, but I don't think it's what we want in the long term.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20328