Merge pull request #99652 from bruvzg/fd_cd_win
[Windows] Fix root and current folder in native file dialog.
This commit is contained in:
commit
aab12fd273
5 changed files with 23 additions and 15 deletions
|
|
@ -572,10 +572,7 @@ void DisplayServerWindows::_thread_fd_monitor(void *p_ud) {
|
|||
}
|
||||
}
|
||||
dir = dir.simplify_path();
|
||||
dir = dir.replace("/", "\\");
|
||||
if (!dir.is_network_share_path() && !dir.begins_with(R"(\\?\)")) {
|
||||
dir = R"(\\?\)" + dir;
|
||||
}
|
||||
dir = dir.trim_prefix(R"(\\?\)").replace("/", "\\");
|
||||
|
||||
IShellItem *shellitem = nullptr;
|
||||
hr = SHCreateItemFromParsingName((LPCWSTR)dir.utf16().ptr(), nullptr, IID_IShellItem, (void **)&shellitem);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue