Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Replace os.rename with shutil.move #48

Closed
wants to merge 5 commits into from
Closed

Replace os.rename with shutil.move #48

wants to merge 5 commits into from

Conversation

a613
Copy link

@a613 a613 commented Apr 16, 2014

Summary

In some cases where multiple mounts are used, the code crashes with [Errno 18] Invalid cross-device link. For example, Codeship build servers are designed in a way that causes this problem.

As mentioned in a few places online (see below) one solution is to use shutil.move instead of os.rename, and that is the change that this pull request makes.

Caution

One difference between os.rename and shutil.move is described in pip pull request #103. Apparently the former creates directories as needed but the latter does not. I am not knowledgable enough about terrarium to decide if that is a problem.

See Also

@winhamwr
Copy link
Contributor

A testcase exhibiting the crash would make this ready to merge in.

@a613
Copy link
Author

a613 commented Dec 15, 2015

How and why would a test deal with multi-mount transfers? It can be done by hand. I know it works - I had a dependency on this branch that is still operating today.

@kylegibson
Copy link
Member

This functionality is available in the 2.0.0-alpha release and will be available for the full 2.0.0 release.

@kylegibson kylegibson closed this Mar 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants