未验证 提交 cb950948 编写于 作者: xh704872627's avatar xh704872627 提交者: GitHub

修改断点续传Bug (#204)

断点续传中使用到了项目的一个扩展方法,但并未上传;去掉了扩展方法的调用
上级 b0da9142
using System;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.Networking;
namespace ET
......@@ -224,6 +225,7 @@ namespace ET
this.headRequest.SendWebRequest();
await this.tcs.Task;
this.totalBytes = long.Parse(this.headRequest.GetResponseHeader("Content-Length"));
string modifiedTime = this.headRequest.GetResponseHeader("Last-Modified");
Log.Debug($"totalBytes: {this.totalBytes}");
this.headRequest?.Dispose();
this.headRequest = null;
......@@ -231,10 +233,6 @@ namespace ET
#endregion
#region Check Local File
var dirPath = Path.GetDirectoryName(filePath);
//如果路径不存在就创建
dirPath.CreateDirectory();
//打开或创建
fileStream = new FileStream(filePath, FileMode.OpenOrCreate, FileAccess.Write);
//获取已下载长度
......
fileFormatVersion: 2
guid: 4f133dd2fbe0e43c2b878d3e865464ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册