up
This commit is contained in:
parent
0c0d82d311
commit
9440d5a065
@ -89,20 +89,15 @@ namespace Comic_CBZ_Helper
|
|||||||
DateTime currentDate = new(2020, 1, 1, 0, 0, 0);
|
DateTime currentDate = new(2020, 1, 1, 0, 0, 0);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
// 循环处理每个漫画文件夹
|
// 循环处理每个漫画文件夹
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (var comicFolder in comicFolders)
|
foreach (var comicFolder in comicFolders)
|
||||||
{
|
{
|
||||||
lock (consoleLock)
|
|
||||||
{
|
|
||||||
// 输出开始处理提示信息
|
|
||||||
Console.WriteLine($"开始处理漫画 {Path.GetFileName(comicFolder)}...");
|
Console.WriteLine($"开始处理漫画 {Path.GetFileName(comicFolder)}...");
|
||||||
}
|
|
||||||
|
|
||||||
// 检查漫画文件夹是否存在
|
// 检查漫画文件夹是否存在
|
||||||
if (!Directory.Exists(comicFolder))
|
if (!Directory.Exists(comicFolder))
|
||||||
{
|
{
|
||||||
throw new DirectoryNotFoundException($"漫画文件夹 {comicFolder} 不存在。");
|
Console.WriteLine($"漫画文件夹 {comicFolder} 不存在。");
|
||||||
|
return; //stop
|
||||||
}
|
}
|
||||||
|
|
||||||
// 临时存储重命名后的文件路径
|
// 临时存储重命名后的文件路径
|
||||||
@ -180,13 +175,6 @@ namespace Comic_CBZ_Helper
|
|||||||
processedFolders++;
|
processedFolders++;
|
||||||
ShowProgress(processedFolders, totalFolders);
|
ShowProgress(processedFolders, totalFolders);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (DirectoryNotFoundException ex)
|
|
||||||
{
|
|
||||||
// 处理异常,例如输出错误信息并停止程序
|
|
||||||
Console.WriteLine(ex.Message);
|
|
||||||
PauseBeforeExit(count); // 停止程序,并等待用户按任意键退出
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PauseBeforeExit(count);
|
PauseBeforeExit(count);
|
||||||
|
Loading…
Reference in New Issue
Block a user