waitBuildIndex waits until buildIndex function finishes, this can terminate with a packfile.ErrEmptyPackfile, this means that nothing was written so we ignore the error
()
| 79 | // with a packfile.ErrEmptyPackfile, this means that nothing was written so we |
| 80 | // ignore the error |
| 81 | func (w *PackWriter) waitBuildIndex() error { |
| 82 | err := <-w.result |
| 83 | if err == packfile.ErrEmptyPackfile { |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | return err |
| 88 | } |
| 89 | |
| 90 | func (w *PackWriter) Write(p []byte) (int, error) { |
| 91 | return w.synced.Write(p) |