Robert E Lee's Maryland campaign was one of Lee's worst performances in the war. He split his army into five different pieces which nearly enabled the destruction of each of those pieces in detail; in fact, Union VI Corps commander William Franklin seized Crampton's Gap, and was poised to crush at least one of Jackson's divisions and save Harper's Ferry, but he managed to convince himself he was outnumbered instead.
So had VI corps had a more aggressive commander, Lee loses another division and Harper's Ferry is saved. Lee accomplishes none of his objectives.