Skip to content

Commit 43dfd24

Browse files
committed
upgrade dokan
1 parent 4cd720c commit 43dfd24

File tree

7 files changed

+12
-7
lines changed

7 files changed

+12
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,10 @@ docker run --name mdrive -d --restart=always \
754754

755755
- [阿里云盘小白羊网盘](https://github.com/gaozhangmin/aliyunpan) https://github.com/gaozhangmin/aliyunpan
756756
- [阿里云盘命令行客户端](https://github.com/tickstep/aliyunpan) https://github.com/tickstep/aliyunpan
757+
- [磁盘挂载备选方案](https://github.com/winfsp/winfsp) https://github.com/winfsp/winfsp
757758

758759
## 鸣谢
759760

760761
- 感谢阿里云盘共创团对 MDrive 的支持。
761762
- 感谢 Duplicati 对本产品的支持。
762-
- [WinSW](https://github.com/winsw/winsw) 系统服务,将本程序安装作为 Windows 服务运行。
763+
- [WinSW](https://github.com/winsw/winsw) 系统服务,将本程序安装作为 Windows 服务运行。
-2.43 MB
Binary file not shown.
-1.27 MB
Binary file not shown.

src/MDriveSync.Core/MDriveSync.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="AlphaVSS" Version="2.0.3" />
15-
<PackageReference Include="DokanNet" Version="2.1.0" />
15+
<PackageReference Include="DokanNet" Version="2.3.0.1" />
1616
<PackageReference Include="FastMember" Version="1.5.0" />
1717

1818
<!--<PackageReference Include="Fody" Version="6.8.0">

src/MDriveSync.Core/Services/AliyunDriveApi.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public AliyunFileList FileList(string driveId, string parentFileId, int limit, s
381381
/// <param name="type"></param>
382382
/// <param name="accessToken"></param>
383383
/// <returns></returns>
384-
public bool TryFileList(string driveId, string parentFileId, int limit, string marker, string orderBy, string orderDirection, string category, string type, string accessToken,
384+
public bool TryFileList(string driveId, string parentFileId, int limit, string marker, string orderBy, string orderDirection, string category, string type, string accessToken,
385385
out AliyunFileList data, ref string code)
386386
{
387387
data = null;
@@ -601,7 +601,8 @@ public RestResponse<T> WithRetry<T>(RestRequest request, bool isThrow = true)
601601
{
602602
return response;
603603
}
604-
else if (response.StatusCode == HttpStatusCode.TooManyRequests)
604+
// = 0 时也重试
605+
else if (response.StatusCode == 0 || response.StatusCode == HttpStatusCode.TooManyRequests)
605606
{
606607
retries++;
607608

src/MDriveSync.Core/Services/AliyunDriveMounter.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,8 @@ public void Mount()
12901290
options.Options |= DokanOptions.WriteProtection;
12911291
}
12921292

1293+
//options.Options = DokanOptions.FixedDrive | DokanOptions.DebugMode | DokanOptions.StderrOutput;
1294+
12931295
options.MountPoint = _driveMountConfig.MountPoint;
12941296
});
12951297

@@ -1302,8 +1304,8 @@ public void Mount()
13021304
AliyunDriveInitFiles();
13031305

13041306
// 创建轮询计划
1305-
// 每 15 分钟更新一次列表
1306-
var scheduler = new QuartzCronScheduler("0 0/15 * * * ?", () =>
1307+
// 每 30 分钟更新一次列表
1308+
var scheduler = new QuartzCronScheduler("0 0/30 * * * ?", () =>
13071309
{
13081310
try
13091311
{

src/MDriveSync.Core/Services/AliyunDriveMounter_Dokan.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ public void Cleanup(string fileName, IDokanFileInfo info)
686686
info.Context = null;
687687
}
688688

689-
if (info.DeleteOnClose)
689+
// info.DeleteOnClose
690+
if (info.DeletePending)
690691
{
691692
if (fileName == "\\")
692693
{

0 commit comments

Comments
 (0)