Finish all the work of physics file.

This commit is contained in:
zicla
2019-04-10 01:59:20 +08:00
parent 7f7fba0425
commit ef78a26c7a
7 changed files with 103 additions and 39 deletions

View File

@ -2,8 +2,6 @@ package rest
import (
"github.com/jinzhu/gorm"
"path/filepath"
"github.com/nu7hatch/gouuid"
"os"
"time"
@ -261,9 +259,7 @@ func (this *MatterDao) Delete(matter *Matter) {
this.logger.Error("删除磁盘上的文件出错 %s", err.Error())
}
//如果目录为空,那么一并删除
dirPath := filepath.Dir(matter.AbsolutePath())
DeleteEmptyDir(dirPath)
//由于目录和物理结构一一对应,这里不能删除上级文件夹。
}
}