fix file reversion

Ticket

+commit
 

reverting to old files/images (eg, via history) doesn't work.