Merge pull request #96283 from bruvzg/win_drv_path

[Windows] Fix handling `X:` paths.
This commit is contained in:
Rémi Verschelde 2024-08-30 09:58:36 +02:00
commit 48b8a36d59
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -71,7 +71,9 @@ struct DirAccessWindowsPrivate {
String DirAccessWindows::fix_path(const String &p_path) const {
String r_path = DirAccess::fix_path(p_path.trim_prefix(R"(\\?\)").replace("\\", "/"));
if (r_path.ends_with(":")) {
r_path += "/";
}
if (r_path.is_relative_path()) {
r_path = current_dir.trim_prefix(R"(\\?\)").replace("\\", "/").path_join(r_path);
} else if (r_path == ".") {