Skip to content

Commit 51ec7fc

Browse files
committed
fix dump non-exist log directory (go-gitea#9818)
1 parent a0435fc commit 51ec7fc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/dump.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ func runDump(ctx *cli.Context) error {
145145
}
146146
}
147147

148-
if err := z.AddDir("log", setting.LogRootPath); err != nil {
149-
log.Fatalf("Failed to include log: %v", err)
148+
if com.IsExist(setting.LogRootPath) {
149+
if err := z.AddDir("log", setting.LogRootPath); err != nil {
150+
log.Fatalf("Failed to include log: %v", err)
151+
}
150152
}
151153

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

0 commit comments

Comments
 (0)