diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 7c94e38e14e..b661222dfef 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1356,18 +1356,13 @@ Error OS_Windows::shell_open(String p_uri) { } Error OS_Windows::shell_show_in_file_manager(String p_path, bool p_open_folder) { - p_path = p_path.trim_suffix("file://"); - bool open_folder = false; if (DirAccess::dir_exists_absolute(p_path) && p_open_folder) { open_folder = true; } - if (p_path.begins_with("\"")) { - p_path = String("\"") + p_path; - } - if (p_path.ends_with("\"")) { - p_path = p_path + String("\""); + if (!p_path.is_quoted()) { + p_path = p_path.quote(); } p_path = p_path.replace("/", "\\");