Convert two uses of eraseFromDisk.