From 1af01f5e308fb14f9fd3b1b5bdd7ab117aab11f3 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 8 Jun 2017 16:26:56 -0400 Subject: [PATCH] restore: create data directory before restoring data files (#4413) --- cmd/restore.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/restore.go b/cmd/restore.go index 4e0004221..8e2d2d1f8 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -101,6 +101,7 @@ func runRestore(c *cli.Context) error { // Data files if !c.Bool("database-only") { + os.MkdirAll(setting.AppDataPath, os.ModePerm) for _, dir := range []string{"attachments", "avatars"} { dirPath := path.Join(setting.AppDataPath, dir) if com.IsExist(dirPath) {