mirror of
https://github.com/thomiceli/opengist.git
synced 2025-05-14 00:02:10 +02:00
fix: do not truncate raw files (#4)
This commit is contained in:
parent
864880b442
commit
31aae8a305
@ -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…
x
Reference in New Issue
Block a user