Skip to content

Commit 9f40bb0

Browse files
lunnytechknowlogick
authored andcommitted
fix dump non-exist log directory (#9818)
1 parent cc2916d commit 9f40bb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/dump.go

+4-2
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)