mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-23 18:27:57 +02:00
fix: do not truncate raw files (#4)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user