update the index so that files can be restored to their original directory