Repository: godotengine/godot
File: editor/docks/filesystem_dock.cpp (C++)

Code before:
	}

	if (drag_data.has("type") && (String(drag_data["type"]) == "files" || String(drag_data["type"]) == "files_and_dirs")) {
		// Move files or add to favorites.
		String to_dir;
		bool favorite;
		_get_drag_target_folder(to_dir, favorite, p_point, p_from);
		if (!to_dir.is_empty()) {
			Vector<String> fnames = drag_data["files"];
			to_move.clear();
			String target_dir = to_dir == "res://" ? to_dir : to_dir.trim_suffix("/");

			for (int i = 0; i < fnames.size(); i++) {
				if (fnames[i].trim_suffix("/").get_base_dir() != target_dir) {
					to_move.push_back(FileOrFolder(fnames[i], !fnames[i].ends_with("/")));
				}
			}
			if (!to_move.is_empty()) {
				String move_confirm_text;
				confirm_move_to_dir = to_dir;

				if (Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) {
					if (to_move.size() == 1) {
						move_confirm_text = vformat(TTR("Copy selected item to \"%s\"?"), target_dir);
					} else {
						move_confirm_text = vformat(TTR("Copy %d selected items to \"%s\"?"), to_move.size(), target_dir);
					}

					confirm_to_copy = true;
					move_confirm_dialog->set_text(move_confirm_text);
					move_confirm_dialog->popup_centered();
				} else {
					if (to_move.size() == 1) {
						move_confirm_text = vformat(TTR("Move selected item to \"%s\"?"), target_dir);
					} else {
						move_confirm_text = vformat(TTR("Move %d selected items to \"%s\"?"), to_move.size(), target_dir);
					}

					confirm_to_copy = false;
					move_confirm_dialog->set_text(move_confirm_text);
					move_confirm_dialog->popup_centered();
				}
			}
		} else if (favorite) {
			// Add the files from favorites.
			Vector<String> fnames = drag_data["files"];
			Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
			for (int i = 0; i < fnames.size(); i++) {
				if (!favorites_list.has(fnames[i])) {
					favorites_list.push_back(fnames[i]);
				}

Review comment (suggestion):
You can unify both messages to
```suggestion
						move_confirm_text = vformat(TTR("Copy %d selected item(s) to \"%s\"?"), to_move.size(), target_dir);
```

Code after:
		String to_dir;
		bool favorite;
		_get_drag_target_folder(to_dir, favorite, p_point, p_from);
		if (!to_dir.is_empty()) {
			Vector<String> fnames = drag_data["files"];
			to_move.clear();
			String target_dir = to_dir == "res://" ? to_dir : to_dir.trim_suffix("/");

			for (int i = 0; i < fnames.size(); i++) {
				if (fnames[i].trim_suffix("/").get_base_dir() != target_dir) {
					to_move.push_back(FileOrFolder(fnames[i], !fnames[i].ends_with("/")));
				}
			}
			if (!to_move.is_empty()) {
				String move_confirm_text;
				confirm_move_to_dir = to_dir;

				if (Input::get_singleton()->is_key_pressed(Key::CMD_OR_CTRL)) {
					move_confirm_text = vformat(TTR("Copy %d selected item(s) to \"%s\"?"), to_move.size(), target_dir);
					confirm_to_copy = true;
				} else {
					move_confirm_text = vformat(TTR("Move %d selected item(s) to \"%s\"?"), to_move.size(), target_dir);
					confirm_to_copy = false;
				}

				move_confirm_dialog->set_text(move_confirm_text);
				move_confirm_dialog->popup_centered();
			}
		} else if (favorite) {
			// Add the files from favorites.
			Vector<String> fnames = drag_data["files"];
			Vector<String> favorites_list = EditorSettings::get_singleton()->get_favorites();
			for (int i = 0; i < fnames.size(); i++) {
				if (!favorites_list.has(fnames[i])) {
					favorites_list.push_back(fnames[i]);
				}
			}
			EditorSettings::get_singleton()->set_favorites(favorites_list);
			_update_tree(get_uncollapsed_paths());
		}
	}

	if (drag_data.has("type") && String(drag_data["type"]) == "nodes") {
		String to_dir;
		bool favorite;
		tree->set_drop_mode_flags(Tree::DROP_MODE_ON_ITEM);
		_get_drag_target_folder(to_dir, favorite, p_point, p_from);
		if (to_dir.is_empty()) {
			to_dir = get_current_directory();
		}
		SceneTreeDock::get_singleton()->save_branch_to_file(to_dir);