1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Merge pull request #113790 from sockeye-d/resource-duplication-invalid-extension

Propagate errors from `EditorFileSystem::_copy_file` through `EditorFileSystem::copy_file`
This commit is contained in:
Rémi Verschelde
2025-12-18 23:31:07 +01:00
2 changed files with 6 additions and 3 deletions

View File

@@ -1576,12 +1576,12 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
Error err = EditorFileSystem::get_singleton()->copy_file(old_path, new_path);
if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ": " + error_names[err] + "\n");
EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + U"" + new_path + ": " + error_names[err] + "\n");
}
} else {
Error err = EditorFileSystem::get_singleton()->copy_directory(old_path, new_path);
if (err != OK) {
EditorNode::get_singleton()->add_io_error(TTR("Error duplicating directory:") + "\n" + old_path + "\n");
EditorNode::get_singleton()->add_io_error(TTR("Error duplicating directory:") + "\n" + old_path + U"" + new_path + ": " + error_names[err] + "\n");
}
}
}