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

Make O_TRUNC use better #152

Closed
wants to merge 1 commit into from
Closed

Make O_TRUNC use better #152

wants to merge 1 commit into from

Conversation

tempusfrangit
Copy link
Contributor

@tempusfrangit tempusfrangit commented Feb 7, 2024

Only use if --force is actually specified

Only use if --force is actually specified
@tempusfrangit
Copy link
Contributor Author

This did reduce the delta (minimally) between tar and non-tar mode. I'm not certain this is worth it. @philandstuff thoughts?

@@ -4,4 +4,5 @@ import "io"

type Consumer interface {
Consume(reader io.Reader, destPath string) error
SetOverwriteTarget(force bool)
Copy link
Contributor

Choose a reason for hiding this comment

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

eeh, I don't like this interface. We should pass a slice/varargs of ConsumeOptions (of which OverwriteTarget would be one instance) into Consume() instead.

@philandstuff
Copy link
Contributor

This did reduce the delta (minimally) between tar and non-tar mode. I'm not certain this is worth it. @philandstuff thoughts?

I think if we can tidy up the interface then this is a good idea. I'd also like to see us do the partial file download thing, where we download to a temp file and move to the target once the file is fully written

@tempusfrangit
Copy link
Contributor Author

Superseded by #158

@tempusfrangit tempusfrangit deleted the o_trunc branch March 1, 2024 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants