Complying with the law on safety is quite different in Poland or Ukraine to in the UK.Poland rebuilt an entire branchline to Ukraine in 6 months, including the decision and funding.
They even went over the border and rebuilt the station on the other side.