Skip to content

Commit

Permalink
fix dump non-exist log directory (#9818) (#9819)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Jan 17, 2020
1 parent e2ddc42 commit f766719
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 @@ -151,8 +151,10 @@ func runDump(ctx *cli.Context) error {
}
}

if err := z.AddDir("log", setting.LogRootPath); err != nil {
fatal("Failed to include log: %v", err)
if com.IsExist(setting.LogRootPath) {
if err := z.AddDir("log", setting.LogRootPath); err != nil {
fatal("Failed to include log: %v", err)
}
}

if err = z.Close(); err != nil {
Expand Down

0 comments on commit f766719

Please sign in to comment.