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
Fixed windows compatibility issue, when storage gateway syncs index f… #7148
base: main
Are you sure you want to change the base?
Conversation
fixes #7147 |
70da760
to
7223ac2
Compare
@@ -154,6 +155,8 @@ func WriteBinary(ctx context.Context, bkt objstore.BucketReader, id ulid.ULID, f | |||
} | |||
|
|||
if tmpFilename != "" { | |||
// On windows renaming an open file will result in access denied error | |||
bw.writer.Close() |
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.
I wonder if this will cause issues with the deferred close above
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.
I dont see a way to check if a filedescriptor has already been closed. Maybe the Close function could set the file descriptor to nil after a succesful close. The Close function should then start by checking for nil and exit if true.
7223ac2
to
b3487cf
Compare
3ef90ec
to
78086ee
Compare
3718883
to
3fac2a7
Compare
…iles to local disk. Signed-off-by: henrikschristensen <51989221+henrikschristensen@users.noreply.github.com>
3fac2a7
to
889b3f1
Compare
…iles to local disk.