Lane was wounded at the Battle of Cold Harbor on June 2 and Barry was appointed brigadier general (temporary) to replace him. However, on July 27, at the First Battle of Deep Bottom, Barry was wounded in the right hand. The wound caused him to lose two fingers to amputation. Because he was disabled and after Lane returned to lead the brigade, the temporary appointment to brigadier general was canceled. In February 1865, Barry was ordered to command a department in North Carolina.