On Windows, materializing the same package repeatedly can fail when the temporary-directory rename returns EPERM even though the target revision directory already exists. The caller should confirm the existing target before treating this as a cache collision; when there is no existing target, the original rename failure should remain visible.
Reproduction: materialize the same package twice on Windows with an existing revision directory.
Expected: the second materialization succeeds using a newly verified copy.
Actual: the rename may fail with EPERM and abort materialization.
On Windows, materializing the same package repeatedly can fail when the temporary-directory rename returns EPERM even though the target revision directory already exists. The caller should confirm the existing target before treating this as a cache collision; when there is no existing target, the original rename failure should remain visible.
Reproduction: materialize the same package twice on Windows with an existing revision directory.
Expected: the second materialization succeeds using a newly verified copy.
Actual: the rename may fail with EPERM and abort materialization.