Finish refine the config things.
This commit is contained in:
@ -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 {
|
||||
|
@ -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)
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user