Skip to content

Commit f766719

Browse files
authored
fix dump non-exist log directory (#9818) (#9819)
1 parent e2ddc42 commit f766719

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
@@ -151,8 +151,10 @@ func runDump(ctx *cli.Context) error {
151151
}
152152
}
153153

154-
if err := z.AddDir("log", setting.LogRootPath); err != nil {
155-
fatal("Failed to include log: %v", err)
154+
if com.IsExist(setting.LogRootPath) {
155+
if err := z.AddDir("log", setting.LogRootPath); err != nil {
156+
fatal("Failed to include log: %v", err)
157+
}
156158
}
157159

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

0 commit comments

Comments
 (0)