when migrate file add file metadata to db

This commit is contained in:
s_jqzhang 2019-04-26 09:36:13 +08:00
parent 60e7f650b8
commit 7477f9ed93

View File

@ -1203,7 +1203,9 @@ func (this *Server) DownloadFromPeer(peer string, fileInfo *FileInfo) {
req.SetTimeout(time.Second*30, time.Second*time.Duration(timeout))
if err = req.ToFile(fpath); err != nil {
log.Error(err)
return
}
this.SaveFileInfoToLevelDB(fileInfo.Md5, fileInfo, this.ldb)
return
}
req.SetTimeout(time.Second*30, time.Second*time.Duration(timeout))