mirror of
https://github.com/gogs/gogs.git
synced 2025-05-29 10:42:30 +00:00
restore: create data directory before restoring data files (#4413)
This commit is contained in:
parent
3efc0d8681
commit
1af01f5e30
@ -101,6 +101,7 @@ func runRestore(c *cli.Context) error {
|
|||||||
|
|
||||||
// Data files
|
// Data files
|
||||||
if !c.Bool("database-only") {
|
if !c.Bool("database-only") {
|
||||||
|
os.MkdirAll(setting.AppDataPath, os.ModePerm)
|
||||||
for _, dir := range []string{"attachments", "avatars"} {
|
for _, dir := range []string{"attachments", "avatars"} {
|
||||||
dirPath := path.Join(setting.AppDataPath, dir)
|
dirPath := path.Join(setting.AppDataPath, dir)
|
||||||
if com.IsExist(dirPath) {
|
if com.IsExist(dirPath) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user