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

Code before:
	if (!overwrite) {
		to_move_path = p_to_path;
		Vector<String> conflicting_items = _check_existing();
		if (!conflicting_items.empty()) {
			// Ask to do something.
			overwrite_dialog->set_text(vformat(
					TTR("The following files or folders conflict with items in the target location '%s':\n\n%s\n\nDo you wish to overwrite them?"),
					to_move_path,
					String("\n").join(conflicting_items)));
			overwrite_dialog->popup_centered_minsize();
			return;
		}
	}

	// Check groups.
	for (int i = 0; i < to_move.size(); i++) {
		if (to_move[i].is_file && EditorFileSystem::get_singleton()->is_group_file(to_move[i].path)) {
			EditorFileSystem::get_singleton()->move_group_file(to_move[i].path, p_to_path.plus_file(to_move[i].path.get_file()));
		}
	}

	Map<String, String> file_renames;
	Map<String, String> folder_renames;
	bool is_moved = false;
	for (int i = 0; i < to_move.size(); i++) {
		String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path;
		String new_path = p_to_path.plus_file(old_path.get_file());
		if (old_path != new_path) {
			_try_move_item(to_move[i], new_path, file_renames, folder_renames);
			is_moved = true;
		}
	}

	if (is_moved) {
		int current_tab = editor->get_current_tab();
		_save_scenes_after_move(file_renames); // Save scenes before updating.
		_update_dependencies_after_move(file_renames);
		_update_resource_paths_after_move(file_renames);
		_update_project_settings_after_move(file_renames);
		_update_favorites_list_after_move(file_renames, folder_renames);

		editor->set_current_tab(current_tab);

		print_verbose("FileSystem: calling rescan.");
		_rescan();

		print_verbose("FileSystem: saving moved scenes.");
		_save_scenes_after_move(file_renames);

		path = p_to_path;
		current_path->set_text(path);

Review comment (suggestion):
```suggestion
	} else if (new_name[0] == '.') {
```

Code after:
		}
	}
	return conflicting_items;
}

void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overwrite) {
	if (!overwrite) {
		to_move_path = p_to_path;
		Vector<String> conflicting_items = _check_existing();
		if (!conflicting_items.empty()) {
			// Ask to do something.
			overwrite_dialog->set_text(vformat(
					TTR("The following files or folders conflict with items in the target location '%s':\n\n%s\n\nDo you wish to overwrite them?"),
					to_move_path,
					String("\n").join(conflicting_items)));
			overwrite_dialog->popup_centered_minsize();
			return;
		}
	}

	// Check groups.
	for (int i = 0; i < to_move.size(); i++) {
		if (to_move[i].is_file && EditorFileSystem::get_singleton()->is_group_file(to_move[i].path)) {
			EditorFileSystem::get_singleton()->move_group_file(to_move[i].path, p_to_path.plus_file(to_move[i].path.get_file()));
		}
	}

	Map<String, String> file_renames;
	Map<String, String> folder_renames;
	bool is_moved = false;
	for (int i = 0; i < to_move.size(); i++) {
		String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path;
		String new_path = p_to_path.plus_file(old_path.get_file());
		if (old_path != new_path) {
			_try_move_item(to_move[i], new_path, file_renames, folder_renames);
			is_moved = true;
		}
	}

	if (is_moved) {
		int current_tab = editor->get_current_tab();
		_save_scenes_after_move(file_renames); // Save scenes before updating.
		_update_dependencies_after_move(file_renames);
		_update_resource_paths_after_move(file_renames);
		_update_project_settings_after_move(file_renames);
		_update_favorites_list_after_move(file_renames, folder_renames);

		editor->set_current_tab(current_tab);

		print_verbose("FileSystem: calling rescan.");
		_rescan();