浏览代码

restore: create data directory before restoring data files (#4413)

Unknwon 7 年之前
父节点
当前提交
1af01f5e30
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      cmd/restore.go

+ 1 - 0
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) {