aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/internal
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem/internal')
-rw-r--r--storage/filesystem/internal/dotgit/writers.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/filesystem/internal/dotgit/writers.go b/storage/filesystem/internal/dotgit/writers.go
index 2407c58..e0a41a8 100644
--- a/storage/filesystem/internal/dotgit/writers.go
+++ b/storage/filesystem/internal/dotgit/writers.go
@@ -190,14 +190,14 @@ func (s *syncedReader) Write(p []byte) (n int, err error) {
func (s *syncedReader) Read(p []byte) (n int, err error) {
defer func() { atomic.AddUint64(&s.read, uint64(n)) }()
- s.sleep()
- n, err = s.r.Read(p)
- if err == io.EOF && !s.isDone() {
- if n == 0 {
- return s.Read(p)
+ for {
+ s.sleep()
+ n, err = s.r.Read(p)
+ if err == io.EOF && !s.isDone() && n == 0 {
+ continue
}
- return n, nil
+ break
}
return