Skip to content

Commit

Permalink
fix: exit bug. #11
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org committed Jun 1, 2024
1 parent 3e22079 commit ece9433
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/MDriveSync.Core/Services/AliyunDriveMounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,14 @@ public void Mount()
// 每 15 分钟更新一次列表
var scheduler = new QuartzCronScheduler("0 0/15 * * * ?", () =>
{
AliyunDriveSearchFiles();
try
{
AliyunDriveSearchFiles();
}
catch (Exception ex)
{
_log.Error(ex, "轮询计划作业查询文件异常");
}
});
scheduler.Start();
Expand Down
9 changes: 8 additions & 1 deletion src/MDriveSync.Core/Services/AliyunDriveMounter_Dokan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,14 @@ public NtStatus SetEndOfFile(string fileName, long length, IDokanFileInfo info)
{
if (!_files.TryGetValue(keyPath, out var f2) || f2 == null)
{
AliyunDriveCreateFolders(keyPath);
try
{
AliyunDriveCreateFolders(keyPath);
}
catch (Exception ex)
{
_log.Error(ex, "创建文件夹异常");
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/MDriveSync.Core/Services/Job.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2045,9 +2045,9 @@ await Parallel.ForEachAsync(addFileKeys, options, async (item, cancellationToken
// TODO
// 如果是大文件,则通过下载链接下载文件
}
catch (Exception)
catch (Exception ex)
{
throw;
_log.LogError(ex, "双向同步执行异常");
}
});

Expand Down

0 comments on commit ece9433

Please sign in to comment.