This currently breaks if entry is a symbolic link, or has been removed or changed to a directory.