Skip to content

Commit

Permalink
Merge pull request #32 from sommye-ctr/sync#5
Browse files Browse the repository at this point in the history
Fixed sync=true while writing #5
  • Loading branch information
0xnullifier authored Dec 18, 2024
2 parents 6403629 + 7acac42 commit 16654dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mermoria.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ func (m *Memoria) WriteStream(key string, r io.Reader, sync bool) error {
return cleanUp(f, fmt.Errorf("Cannot close compression error %s", err))
}

// if sync {
// if err := f.Sync(); err != nil {
// cleanUp(f, fmt.Errorf("Cannot Sync: %s", err))
// }
// }
if sync {
if err := f.Sync(); err != nil {
cleanUp(f, fmt.Errorf("Cannot Sync: %s", err))
}
}
if err := f.Close(); err != nil {
return fmt.Errorf("Cannot close file: %s", err)
}
Expand Down

0 comments on commit 16654dc

Please sign in to comment.