mirror of
https://github.com/restic/restic.git
synced 2024-12-25 01:06:39 +00:00
Merge pull request #597 from restic/fix-panic-596
Fix panic for debug.Log() with empty string
This commit is contained in:
commit
24385ff56e
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ func Log(tag string, f string, args ...interface{}) {
|
|||
current := time.Now()
|
||||
opts.last[process{tag, goroutine}] = current
|
||||
|
||||
if f[len(f)-1] != '\n' {
|
||||
if len(f) == 0 || f[len(f)-1] != '\n' {
|
||||
f += "\n"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue