File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var Obj model.Config
1717func init () {
1818 once .Do (func () {
1919 InitConfigFileFolder ()
20+ InitThemeFolder ()
2021 if ! tool .IsExists (static .ConfigFileFullName ) {
2122 log .Infof ("配置文件 %s 不存在,使用内置默认参数。" , static .ConfigFileFullName )
2223 initConfigByDefault ()
Original file line number Diff line number Diff line change @@ -54,3 +54,16 @@ func InitConfigFileFolder() {
5454 log .Infoln ("创建文件夹 " + static .ConfigFolderFullName + " 成功!\n " )
5555 }
5656}
57+
58+ // InitThemeFolder 初始化主题文件夹
59+ func InitThemeFolder () {
60+ if ! tool .IsExists (static .ThemeFolderFullName ) {
61+ log .Infoln ("主题文件夹 " + static .ThemeFolderFullName + " 不存在,创建中..." )
62+ err := os .Mkdir (static .ThemeFolderFullName , os .ModePerm )
63+ if err != nil {
64+ log .Errorf ("创建文件夹 " + static .ThemeFolderFullName + " 失败!\n " )
65+ panic (err )
66+ }
67+ log .Infoln ("创建文件夹 " + static .ThemeFolderFullName + " 成功!\n " )
68+ }
69+ }
You can’t perform that action at this time.
0 commit comments