Refine some codes of make directory.

This commit is contained in:
zicla
2019-03-01 02:25:32 +08:00
parent daa4a3e7b8
commit 431ef6accc
5 changed files with 57 additions and 14 deletions

View File

@ -53,7 +53,7 @@ func (this *MatterService) GetDirUuid(userUuid string, dir string) string {
}
if dir == "/" {
return "root"
return MATTER_ROOT
}
if dir[len(dir)-1] == '/' {
@ -67,7 +67,7 @@ func (this *MatterService) GetDirUuid(userUuid string, dir string) string {
panic("文件夹最多32层。")
}
puuid := "root"
puuid := MATTER_ROOT
for k, name := range folders {
if len(name) > 200 {
@ -105,7 +105,7 @@ func (this *MatterService) Detail(uuid string) *Matter {
//组装file的内容展示其父组件。
puuid := matter.Puuid
tmpMatter := matter
for puuid != "root" {
for puuid != MATTER_ROOT {
pFile := this.matterDao.CheckByUuid(puuid)
tmpMatter.Parent = pFile
tmpMatter = pFile