Skip to content

Commit

Permalink
fix dump non-exist log directory (go-gitea#9818)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Jan 17, 2020
1 parent a0435fc commit 51ec7fc
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 51ec7fc

Please sign in to comment.