mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
new: Improve the automatic update module, add authentication, and fix some bugs
This commit is contained in:
11
main.go
11
main.go
@@ -9,17 +9,20 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
_, err := os.Stat(mApp.SRC)
|
||||
src := config.MConfigInstance.Storage.SRC
|
||||
dst := config.MConfigInstance.Storage.DST
|
||||
|
||||
_, err := os.Stat(src)
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(mApp.SRC, os.ModePerm)
|
||||
err = os.MkdirAll(src, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
_, err = os.Stat(mApp.DST)
|
||||
_, err = os.Stat(dst)
|
||||
if os.IsNotExist(err) {
|
||||
err = os.MkdirAll(mApp.DST, os.ModePerm)
|
||||
err = os.MkdirAll(dst, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user