Skip to content

Commit 9809fe2

Browse files
lunnylafriks
authored andcommitted
fix dump non-exist log directory (#9818) (#9820)
Co-authored-by: Lauris BH <[email protected]>
1 parent ed6a2f2 commit 9809fe2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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)