소스 검색

Merge pull request #44610 from m4gr3d/fix_top_level_android_export_3_2

[3.2] Fix the `String::get_base_dir()` logic to properly check for top level directories on Windows
Rémi Verschelde 4 년 전
부모
커밋
cddff0404d
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      core/ustring.cpp

+ 4 - 1
core/ustring.cpp

@@ -3970,7 +3970,10 @@ bool String::is_rel_path() const {
 
 
 String String::get_base_dir() const {
 String String::get_base_dir() const {
 
 
-	int basepos = find("://");
+	int basepos = find(":/");
+	if (basepos == -1) {
+		basepos = find(":\\");
+	}
 	String rs;
 	String rs;
 	String base;
 	String base;
 	if (basepos != -1) {
 	if (basepos != -1) {