Skip to content

Commit 67611c5

Browse files
authored
Merge pull request #108 from ipfs/fix/7-8-null-bootstrappers
Fix 7-to-8 null bootstrapper handling
2 parents 26e2584 + 7dc6464 commit 67611c5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ipfs-7-to-8/migration/config_conv.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ func convert(in io.Reader, out io.Writer, convFunc convFunc) error {
7878
if bootstrapi == nil {
7979
log.Log("Bootstrap field missing or of the wrong type")
8080
log.Log("Nothing to migrate")
81-
return nil
81+
_, err := out.Write(data)
82+
return err
8283
}
8384
}
8485
bootstrap := make([]string, len(bootstrapi))
@@ -91,9 +92,11 @@ func convert(in io.Reader, out io.Writer, convFunc convFunc) error {
9192
if err != nil {
9293
return err
9394
}
94-
out.Write(fixed)
95-
out.Write([]byte("\n"))
96-
return nil
95+
if _, err := out.Write(fixed); err != nil {
96+
return err
97+
}
98+
_, err = out.Write([]byte("\n"))
99+
return err
97100
}
98101

99102
func ver7to8(bootstrap []string) []string {

0 commit comments

Comments
 (0)