From 7acac42f2347830d249c99c55089520a5413416c Mon Sep 17 00:00:00 2001 From: Somye Date: Tue, 17 Dec 2024 16:06:34 +0530 Subject: [PATCH] Uncommented --- mermoria.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mermoria.go b/mermoria.go index 8be0d6e..cdedf58 100644 --- a/mermoria.go +++ b/mermoria.go @@ -140,11 +140,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) }