Skip to content
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

fix(file rename): Overwrite original file rather than use Rename #21

Merged
merged 1 commit into from
Oct 29, 2020
Merged

fix(file rename): Overwrite original file rather than use Rename #21

merged 1 commit into from
Oct 29, 2020

Conversation

laneroberts-ul
Copy link
Contributor

When decrypting a file inside Docker, os.Rename() results in an 'invalid cross-device link' error. This is not an optimized solution, but fixed the issue I was having.

Resolves #20

This prevents an 'invalid cross-device link' error when running inside docker
@clok
Copy link
Contributor

clok commented Oct 28, 2020

Thank you for the submission. I will take a look at it soon. The os.Rename is a nice helper, but I can see using a tmp file move as a safe option all around.

@clok clok self-requested a review October 29, 2020 03:28
@clok clok added the bug Something isn't working, a bugfix label Oct 29, 2020
Copy link
Contributor

@clok clok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laneroberts-ul Looks good. I am going to merge this patch and then apply this to the 2 other locations where os.Rename is used. I have plans for a v2 refactor of the codebase that will DRY up the code and will hopefully result in a more extensible tool.

Thank you again for the contribution. I will tag this PR once the release is pushed.

@clok clok changed the title Overwrite original file rather than use Rename fix(file rename): Overwrite original file rather than use Rename Oct 29, 2020
@clok clok merged commit c6664a9 into GoodwayGroup:master Oct 29, 2020
@clok
Copy link
Contributor

clok commented Oct 29, 2020

@laneroberts-ul
Copy link
Contributor Author

@clok Thank you! Now I can re-simplify my pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, a bugfix
Development

Successfully merging this pull request may close these issues.

'invalid cross-device link' error
2 participants