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
Copy files when they originate out of MEDIA_ROOT #486
Copy files when they originate out of MEDIA_ROOT #486
Conversation
a6cd20a
to
a3f3c15
Compare
b4dbddc
to
eb60095
Compare
eb60095
to
b20fd8d
Compare
| _file.close() | ||
| else: | ||
| os.close(fd) | ||
| except FileExistsError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you refactor this except so that it is more closely located to the code that emits the exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! I pushed that just now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That fails on the open due to the 0o666 open mode, so the exception handler being down here is needed.
b20fd8d
to
78e8fda
Compare
Django would move files in cases where the source was a file:/// repository. https://pulp.plan.io/issues/5941 closes #5941 https://pulp.plan.io/issues/5870 closes #5870
78e8fda
to
07340fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out and confirmed it fixed the problem.
Django would move files in cases where the source was a file:///
repository.
https://pulp.plan.io/issues/5941
closes #5941
https://pulp.plan.io/issues/5870
closes #5870