Skip to content

Commit

Permalink
Merge pull request godotengine#93294 from rune-scape/autoload-incorre…
Browse files Browse the repository at this point in the history
…ct-path

Fix incorrect autoload path in error
  • Loading branch information
akien-mga committed Jun 18, 2024
2 parents 470cc59 + 97105f2 commit b435551
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/editor_autoload_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,12 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_
}

if (!FileAccess::exists(p_path)) {
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. File does not exist."), path));
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. File does not exist."), p_path));
return false;
}

if (!p_path.begins_with("res://")) {
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. Not in resource path (res://)."), path));
EditorNode::get_singleton()->show_warning(TTR("Can't add Autoload:") + "\n" + vformat(TTR("%s is an invalid path. Not in resource path (res://)."), p_path));
return false;
}

Expand Down

0 comments on commit b435551

Please sign in to comment.