Browse Source

fix dump non-exist log directory (#9818) (#9820)

Co-authored-by: Lauris BH <lauris@nix.lv>
tags/v1.10.3
Lunny Xiao 5 years ago committed by Antoine GIRARD
parent
commit
9809fe27c4
  1. 6
      cmd/dump.go

6
cmd/dump.go

@ -145,8 +145,10 @@ func runDump(ctx *cli.Context) error {
}
}
if err := z.AddDir("log", setting.LogRootPath); err != nil {
log.Fatalf("Failed to include log: %v", err)
if com.IsExist(setting.LogRootPath) {
if err := z.AddDir("log", setting.LogRootPath); err != nil {
log.Fatalf("Failed to include log: %v", err)
}
}
if err = z.Close(); err != nil {

Loading…
Cancel
Save