mirror of https://github.com/tuyoogame/YooAsset
fix #311
parent
79ac231df2
commit
e5f5241879
|
@ -250,17 +250,17 @@ namespace YooAsset
|
||||||
if (File.Exists(_tempFilePath))
|
if (File.Exists(_tempFilePath))
|
||||||
{
|
{
|
||||||
FileInfo fileInfo = new FileInfo(_tempFilePath);
|
FileInfo fileInfo = new FileInfo(_tempFilePath);
|
||||||
|
if (fileInfo.Length >= Bundle.FileSize)
|
||||||
|
{
|
||||||
|
// 删除临时文件
|
||||||
|
File.Delete(_tempFilePath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fileBeginLength = fileInfo.Length;
|
fileBeginLength = fileInfo.Length;
|
||||||
_fileOriginLength = fileBeginLength;
|
_fileOriginLength = fileBeginLength;
|
||||||
DownloadedBytes = _fileOriginLength;
|
DownloadedBytes = _fileOriginLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测下载起始位置
|
|
||||||
if (fileBeginLength >= Bundle.FileSize)
|
|
||||||
{
|
|
||||||
// 删除临时文件
|
|
||||||
if (File.Exists(_tempFilePath))
|
|
||||||
File.Delete(_tempFilePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建下载器
|
// 创建下载器
|
||||||
|
|
Loading…
Reference in New Issue