forked from TrueCloudLab/restic
Fix panic for debug.Log() with empty string
This commit is contained in:
parent
6f5bf45212
commit
f51bc8e9b9
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ func Log(tag string, f string, args ...interface{}) {
|
||||||
current := time.Now()
|
current := time.Now()
|
||||||
opts.last[process{tag, goroutine}] = current
|
opts.last[process{tag, goroutine}] = current
|
||||||
|
|
||||||
if f[len(f)-1] != '\n' {
|
if len(f) == 0 || f[len(f)-1] != '\n' {
|
||||||
f += "\n"
|
f += "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue