summaryrefslogtreecommitdiffstats
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 7c94e38e14..b661222dfe 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("/", "\\");