X-Git-Url: http://www.git.stargrave.org/?p=glocate.git;a=blobdiff_plain;f=index.go;h=c05e4c0b84d35c2d6d49beede0faf14c8f985fd98f2d42c1bf11a336f2f49381;hp=c6fa5398b74fb4ace31a4f09587b8579e3b9642d55040d46e92a1f37fe5e99fb;hb=db65ffeff7274def395c8ee747873d0e9d8250b75f543b6ac0d7bbd079cce66d;hpb=d5b8c235a1f3088c6c1e7261df3d1b565d042db2ba2ad1bbd1018782b9178e1f diff --git a/index.go b/index.go index c6fa539..c05e4c0 100644 --- a/index.go +++ b/index.go @@ -1,7 +1,6 @@ package main import ( - "bufio" "fmt" "log" "os" @@ -25,10 +24,9 @@ func index() *os.File { close(dirSizerJob) }() - bw := bufio.NewWriterSize(tmp0, 1<<17) writerJob := make(chan struct{}) go func() { - writer(bw, entsWriter) + writer(tmp0, entsWriter) close(writerJob) }() @@ -45,9 +43,6 @@ func index() *os.File { <-dirSizerJob close(entsWriter) <-writerJob - if err = bw.Flush(); err != nil { - log.Fatalln(err) - } tmp1 := applyDirSizes(tmp0, dirSizes) tmp0.Close()