Napoleon and Hitler were the attackers, and NOT the defenders, like Ukraine.
The Ukrainians attacked Poland from the East in 1939 and drove Polish forces back into the Nazis. The Polish thought they would be able to escape the Nazis by fleeing into Ukraine. The Polish learned never to trust the Ukrainians.