forked from TrueCloudLab/rclone
lsjson: fix unterminated JSON in the presence of errors
See: https://forum.rclone.org/t/rclone-lsjson-invalid-json-produced-no-at-the-end/22046
This commit is contained in:
parent
bae550c71e
commit
1415666074
1 changed files with 1 additions and 4 deletions
|
@ -121,14 +121,11 @@ can be processed line by line as each item is written one to a line.
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if !first {
|
if !first {
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
fmt.Println("]")
|
fmt.Println("]")
|
||||||
return nil
|
return err
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue