Fixed #21057: FileSystemStorage can leave temporary files around. #1571

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@cabincode
Contributor

cabincode commented Sep 6, 2013

This patch makes sure that the uploaded file is always closed, ensuring that temporary files get cleaned up.

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Sep 9, 2013

Member

Any possibility of adding a test for this?

Member

timgraham commented Sep 9, 2013

Any possibility of adding a test for this?

@cabincode

This comment has been minimized.

Show comment
Hide comment
@cabincode

cabincode Sep 9, 2013

Contributor

I don't see how, unfortunately -- as noted in the ticket, I only see the debris under uWSGI, in a production configuration. The temporary file is cleaned up quickly under the dev server. I think you'd have to perturb the test setup so much that the test wouldn't have any value.

Contributor

cabincode commented Sep 9, 2013

I don't see how, unfortunately -- as noted in the ticket, I only see the debris under uWSGI, in a production configuration. The temporary file is cleaned up quickly under the dev server. I think you'd have to perturb the test setup so much that the test wouldn't have any value.

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Sep 10, 2013

Member

All right, that's what I figured.

merged in 30fc49a

Member

timgraham commented Sep 10, 2013

All right, that's what I figured.

merged in 30fc49a

@timgraham timgraham closed this Sep 10, 2013

@cabincode cabincode deleted the cabincode:ticket-21057 branch Oct 1, 2013

@cabincode cabincode restored the cabincode:ticket-21057 branch Oct 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment