Skip to content

Commit 7805211

Browse files
authored
Merge pull request #136 from dotnet-campus/t/lindexi/SyncTool
2 parents fb0a2fd + 7a1a4a7 commit 7805211

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,8 @@ FormatCode:
428428
dotnet tool install -g dotnetCampus.SyncTool
429429
```
430430

431+
或从 [Release](https://github.com/dotnet-campus/dotnetcampus.DotNETBuildSDK/releases) 中下载已提前构建的二进制文件,规避同步机器不带 dotnet SDK 问题
432+
431433
使用方法如下,使用时需要分为服务端和客户端,从服务端单向将文件同步给到客户端
432434

433435
服务端命令如下
@@ -452,6 +454,8 @@ SyncTool sync [参数]
452454
- `-a``-Address` : 同步服务的地址。必填,格式如 `http://127.0.0.1:56621` 等地址
453455
- `-f``-Folder` : 本地同步的文件夹。可选,不填默认为工作路径
454456

457+
458+
455459
### 制作符合 UOS 规范的 deb 安装包的工具
456460

457461
可以打包出符合 UOS 规范的 deb 安装包的工具

SyncTool/Client/SyncOptions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ async Task RemoveRedundantFolder(List<SyncFolderPathInfo> syncFolderPathInfoList
300300
}
301301
else
302302
{
303-
Directory.Delete(folder);
303+
// 删除空文件夹的时候,可能遇到空文件夹里面还包含其他空文件夹,导致删除失败
304+
// System.IO.IOException: Directory not empty
305+
Directory.Delete(folder, true);
304306
if (!Directory.Exists(folder))
305307
{
306308
break;

0 commit comments

Comments
 (0)