diff options
author | Unknwon <u@gogs.io> | 2017-02-09 15:33:57 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-09 15:33:57 -0500 |
commit | 09ad42b918f19bb8f3f405a0521238ab66d3b702 (patch) | |
tree | 92075ed3cfe3c7ae720e138962d0198ad11a92ab /cmd | |
parent | 074c92b0a3543b4457cc6889a879e49e3971835f (diff) |
dump: include data-subdirs (#4100)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dump.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/dump.go b/cmd/dump.go index c1361f93..5bc3c639 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -87,9 +87,17 @@ func runDump(ctx *cli.Context) error { } else { log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath) } + if err := z.AddDir("log", setting.LogRootPath); err != nil { log.Fatalf("Fail to include log: %v", err) } + + for _, dir := range []string{"attachments", "avatars"} { + if err := z.AddDir(path.Join("data", dir), path.Join(setting.AppDataPath, dir)); err != nil { + log.Fatalf("Fail to include data/%s: %v", dir, err) + } + } + // FIXME: SSH key file. if err = z.Close(); err != nil { os.Remove(fileName) |