Fix invalid suggested file name when saving resource from a scene that hasn't been saved yet

This commit is contained in:
Artemy Fedotov
2025-09-03 19:20:08 +04:00
parent 0c51ede243
commit 7b850260bf
2 changed files with 5 additions and 2 deletions

View File

@ -1690,7 +1690,7 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
file->set_current_file(String());
}
}
} else if (!p_resource->get_path().is_empty()) {
} else if (!p_resource->get_path().get_base_dir().is_empty()) {
file->set_current_path(p_resource->get_path());
if (!extensions.is_empty()) {
const String ext = p_resource->get_path().get_extension().to_lower();