You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Simplify script paths to ensure proper resource path checks
This commit is contained in:
@@ -330,7 +330,7 @@ Error GDScriptParser::parse(const String &p_source_code, const String &p_script_
|
|||||||
|
|
||||||
tokenizer.set_source_code(source);
|
tokenizer.set_source_code(source);
|
||||||
tokenizer.set_cursor_position(cursor_line, cursor_column);
|
tokenizer.set_cursor_position(cursor_line, cursor_column);
|
||||||
script_path = p_script_path;
|
script_path = p_script_path.simplify_path();
|
||||||
current = tokenizer.scan();
|
current = tokenizer.scan();
|
||||||
// Avoid error or newline as the first token.
|
// Avoid error or newline as the first token.
|
||||||
// The latter can mess with the parser when opening files filled exclusively with comments and newlines.
|
// The latter can mess with the parser when opening files filled exclusively with comments and newlines.
|
||||||
|
|||||||
Reference in New Issue
Block a user