Skip to content

Commit

Permalink
Libraries which did not open a file must not sync them.
Browse files Browse the repository at this point in the history
... or do any system-level stuff with the files, because they do not
know the specifics, for example where, on which file system or network
device the files are being stored. Only the file creator knows that.
  • Loading branch information
ivoras committed Apr 28, 2019
1 parent 34f713b commit e5a4256
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"os"
"reflect"

"github.com/go-audio/audio"
Expand Down Expand Up @@ -316,9 +315,5 @@ func (e *Encoder) Close() error {
if _, err := e.w.Seek(0, 2); err != nil {
return err
}
switch e.w.(type) {
case *os.File:
return e.w.(*os.File).Sync()
}
return nil
}

0 comments on commit e5a4256

Please sign in to comment.