mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-22 20:42:40 +00:00
fix: do not truncate raw files (#4)
This commit is contained in:
parent
864880b442
commit
31aae8a305
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ func truncateCommandOutput(out io.Reader, maxBytes int64) (string, bool, error)
|
|||
if err != nil {
|
||||
return "", false, err
|
||||
}
|
||||
truncated := len(buf) >= int(maxBytes)
|
||||
truncated := maxBytes > 0 && len(buf) >= int(maxBytes)
|
||||
// Remove the last line if it's truncated
|
||||
if truncated {
|
||||
// Find the index of the last newline character
|
||||
|
|
Loading…
Reference in a new issue