Finish refine the config things.

This commit is contained in:
zicla
2019-04-28 01:51:08 +08:00
parent 8aa0d11cbb
commit a4f28cca30
8 changed files with 44 additions and 44 deletions

View File

@ -76,7 +76,7 @@ func (this *FootprintService) Trace(writer http.ResponseWriter, request *http.Re
}
//有可能DB尚且没有配置 直接打印出内容,并且退出
if core.CONFIG.IsInstalled() {
if core.CONFIG.Installed() {
user := this.findUser(writer, request)
userUuid := ""
if user != nil {

View File

@ -366,7 +366,7 @@ func (this *MatterDao) Cleanup() {
db := core.CONTEXT.GetDB().Where("uuid is not null").Delete(Matter{})
this.PanicError(db.Error)
err := os.RemoveAll(core.CONFIG.GetMatterPath())
err := os.RemoveAll(core.CONFIG.MatterPath())
this.PanicError(err)
}

View File

@ -68,7 +68,7 @@ func NewRootMatter(user *User) *Matter {
//获取到用户文件的根目录。
func GetUserFileRootDir(username string) (rootDirPath string) {
rootDirPath = fmt.Sprintf("%s/%s/%s", core.CONFIG.GetMatterPath(), username, MATTER_ROOT)
rootDirPath = fmt.Sprintf("%s/%s/%s", core.CONFIG.MatterPath(), username, MATTER_ROOT)
return rootDirPath
}
@ -76,7 +76,7 @@ func GetUserFileRootDir(username string) (rootDirPath string) {
//获取到用户缓存的根目录。
func GetUserCacheRootDir(username string) (rootDirPath string) {
rootDirPath = fmt.Sprintf("%s/%s/%s", core.CONFIG.GetMatterPath(), username, MATTER_CACHE)
rootDirPath = fmt.Sprintf("%s/%s/%s", core.CONFIG.MatterPath(), username, MATTER_CACHE)
return rootDirPath
}