summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-01-17 10:56:51 +0800
committertechknowlogick <techknowlogick@gitea.io>2020-01-16 21:56:51 -0500
commit9f40bb020eaea153eca77d3071a4f2cc8bcd2a8e (patch)
treebe47ea6d1440411a47ec15219ae115109c63b65c /cmd
parentcc2916dc5acea2c32372082986f8c2e2c43e55fe (diff)
downloadgitea-9f40bb020eaea153eca77d3071a4f2cc8bcd2a8e.tar.gz
gitea-9f40bb020eaea153eca77d3071a4f2cc8bcd2a8e.zip
fix dump non-exist log directory (#9818)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dump.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index 6cbf04c468..d4461bea93 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -151,8 +151,10 @@ func runDump(ctx *cli.Context) error {
}
}
- if err := z.AddDir("log", setting.LogRootPath); err != nil {
- fatal("Failed to include log: %v", err)
+ if com.IsExist(setting.LogRootPath) {
+ if err := z.AddDir("log", setting.LogRootPath); err != nil {
+ fatal("Failed to include log: %v", err)
+ }
}
if err = z.Close(); err != nil {