mirror of
https://github.com/eyebluecn/tank.git
synced 2024-04-21 12:32:16 +00:00
1、Fix "Scan Disk" user_uuid error that causes WebDAV unable to display scan list.
2、Fix the problem of abnormality when scanning non-existent folders.
This commit is contained in:
@@ -518,9 +518,10 @@ func (this *MatterDao) Delete(matter *Matter) {
|
||||
//delete from db.
|
||||
db := core.CONTEXT.GetDB().Delete(&matter)
|
||||
this.PanicError(db.Error)
|
||||
|
||||
//delete dir from disk.
|
||||
util.DeleteEmptyDir(matter.AbsolutePath())
|
||||
if util.PathExists(matter.AbsolutePath()) {
|
||||
//delete dir from disk.
|
||||
util.DeleteEmptyDir(matter.AbsolutePath())
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -133,9 +133,10 @@ func (this *TaskService) doScanTask() {
|
||||
this.logger.Info("scan spaceName = %s", space.Name)
|
||||
|
||||
//find admin as operator.
|
||||
adminUser := this.userDao.FindAnAdmin()
|
||||
this.matterService.DeleteByPhysics(request, adminUser, space)
|
||||
this.matterService.ScanPhysics(request, adminUser, space)
|
||||
// adminUser := this.userDao.FindAnAdmin()
|
||||
user := this.userDao.FindByUuid(space.UserUuid)
|
||||
this.matterService.DeleteByPhysics(request, user, space)
|
||||
this.matterService.ScanPhysics(request, user, space)
|
||||
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user