Skip to content

Commit

Permalink
fix dump non-exist log directory (#9818) (#9820)
Browse files Browse the repository at this point in the history
Co-authored-by: Lauris BH <lauris@nix.lv>
  • Loading branch information
2 people authored and sapk committed Jan 17, 2020
1 parent ed6a2f2 commit 9809fe2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9809fe2

Please sign in to comment.