-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests are failing on Plan 9 because os.Rename doesn't rename across directory #86
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
os.Rename documentation says: "OS-specific restrictions may apply when oldpath and newpath are in different directories." On Unix, this means we can't rename across devices. On Plan 9 however, the functionality is even more limit: cross-directory renames are not allowed at all. Add a wrapper around os.Rename for Plan 9, which will copy the file if we're renaming across directory. All tests seems to pass. (Aside: I also had to write this wrapper to get go-git working on Plan 9: https://github.com/go-git/go-billy/blob/v5.0.0/osfs/os_plan9.go#L27 but I notice few issues with that one.) Fixes ipfs#86
os.Rename documentation says: "OS-specific restrictions may apply when oldpath and newpath are in different directories." On Unix, this means we can't rename across devices. On Plan 9 however, the functionality is even more limited: cross-directory renames are not allowed at all. Add a wrapper around os.Rename for Plan 9, which will copy the file if we're renaming across directory. All tests seems to pass. (Aside: I also had to write this wrapper to get go-git working on Plan 9: https://github.com/go-git/go-billy/blob/v5.0.0/osfs/os_plan9.go#L27 but I notice few issues with that one.) Fixes ipfs#86
os.Rename documentation says: "OS-specific restrictions may apply when oldpath and newpath are in different directories." On Unix, this means we can't rename across devices. On Plan 9 however, the functionality is even more limited: cross-directory renames are not allowed at all. Add a wrapper around os.Rename for Plan 9, which will copy the file if we're renaming across directory. All tests seems to pass. (Aside: I also had to write this wrapper to get go-git working on Plan 9: https://github.com/go-git/go-billy/blob/v5.0.0/osfs/os_plan9.go#L27 but I notice few issues with that one.) Fixes #86
Example failure:
The text was updated successfully, but these errors were encountered: