Skip to content

Commit 26d1577

Browse files
committedJul 9, 2024
Merge pull request godotengine#94131 from dalexeev/gds-fix-mismatched-parser-autoloads
GDScript: Fix "Mismatched external parser" for autoloads
2 parents 5514510 + 110c4d4 commit 26d1577

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎core/config/project_settings.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
329329
String path = p_value;
330330
if (path.begins_with("*")) {
331331
autoload.is_singleton = true;
332-
autoload.path = path.substr(1);
332+
autoload.path = path.substr(1).simplify_path();
333333
} else {
334-
autoload.path = path;
334+
autoload.path = path.simplify_path();
335335
}
336336
add_autoload(autoload);
337337
} else if (p_name.operator String().begins_with("global_group/")) {

‎modules/gdscript/gdscript_parser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ Error GDScriptParser::parse_binary(const Vector<uint8_t> &p_binary, const String
413413
}
414414

415415
tokenizer = buffer_tokenizer;
416-
script_path = p_script_path;
416+
script_path = p_script_path.simplify_path();
417417
current = tokenizer->scan();
418418
// Avoid error or newline as the first token.
419419
// The latter can mess with the parser when opening files filled exclusively with comments and newlines.

0 commit comments

Comments
 (0)