Skip to content

Commit

Permalink
Windows v2.8.0 Desktop v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeric-X committed May 12, 2024
1 parent 98b0df8 commit d21098f
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v2.7.5.1
v2.8.0
- 功能:支持同步多个文件、文件夹,移动端体现为zip压缩文件,安卓端`HTTP Shortcuts`配置也需要更新以支持此功能
- 修复:最大上传文件大小设置项在混合模式无法设置(#68)
- 修复:Windows端无法下载`.lnk``.url``.wsh`类型的文件
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ PUT /SyncClipboard.json
}
{
"Type": "Image", // or "File"
"Clipboard": "md5 hash, optional",
"Type": "Image", // or "File", "Group"
"Clipboard": "hash, optional",
"File": "filename"
}
```
Expand All @@ -237,3 +237,4 @@ PUT /SyncClipboard.json
[Vanara](https://github.com/dahall/Vanara)
[Tmds.DBus](https://github.com/tmds/Tmds.DBus)
[SharpHook](https://github.com/TolikPylypchuk/SharpHook)
[DotNetZip.Semverd](https://github.com/haf/DotNetZip.Semverd)
4 changes: 2 additions & 2 deletions build/macos/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<key>NSHighResolutionCapable</key>
<true/>
<key>CFBundleVersion</key>
<string>0.6.4.1</string>
<string>0.7.0</string>
<key>CFBundleShortVersionString</key>
<string>0.6.4.1</string>
<string>0.7.0</string>
</dict>
</plist>
5 changes: 3 additions & 2 deletions docs/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ PUT /SyncClipboard.json
}
{
"Type": "Image", // or "File"
"Clipboard": "md5 hash, optional",
"Type": "Image", // or "File", "Group"
"Clipboard": "hash, optional",
"File": "filename"
}
```
Expand All @@ -235,3 +235,4 @@ PUT /SyncClipboard.json
[Vanara](https://github.com/dahall/Vanara)
[Tmds.DBus](https://github.com/tmds/Tmds.DBus)
[SharpHook](https://github.com/TolikPylypchuk/SharpHook)
[DotNetZip.Semverd](https://github.com/haf/DotNetZip.Semverd)
25 changes: 23 additions & 2 deletions src/SyncClipboard.Core/AppCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ private async void PrepareRemoteWorkingFolder()

private void PrepareWorkingFolder(ConfigManager configManager)
{
DeletePreviousTempFile();
PlannedTask(configManager);

var timer = Services.GetRequiredService<System.Timers.Timer>();
Expand All @@ -230,8 +231,8 @@ private static void PlannedTask(ConfigManager configManager)
var logFolder = new DirectoryInfo(Env.LogFolder);
if (logFolder.Exists && config.LogRemainDays != 0)
{
var logFiles = logFolder.EnumerateFileSystemInfos("????????.txt");
var dumpFiles = logFolder.EnumerateFileSystemInfos("????-??-?? ??-??-??.dmp");
var logFiles = logFolder.EnumerateFiles("????????.txt");
var dumpFiles = logFolder.EnumerateFiles("????-??-?? ??-??-??.dmp");
DeleteOutDateFile(logFiles, "yyyyMMdd", TimeSpan.FromDays(config.LogRemainDays));
DeleteOutDateFile(dumpFiles, "yyyy-MM-dd HH-mm-ss", TimeSpan.FromDays(config.LogRemainDays));
}
Expand All @@ -253,5 +254,25 @@ private static void DeleteOutDateFile(IEnumerable<FileSystemInfo> files, string
}
}
}

// 删除历史版本的临时文件,在未来版本中删除
private static void DeletePreviousTempFile()
{
try
{
var files = new DirectoryInfo(Env.AppDataFileFolder).EnumerateFiles();
foreach (var file in files)
{
file.Delete();
}

var oldImageFolder = Path.Combine(Env.AppDataFileFolder, "temp images");
if (Directory.Exists(oldImageFolder))
{
Directory.Delete(oldImageFolder, true);
}
}
catch { }
}
}
}
2 changes: 1 addition & 1 deletion src/SyncClipboard.Desktop/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ internal class AppConfig : IAppConfig
{
public string AppId => Env.AppId;
public string AppStringId => "SyncClipboard.Desktop";
public string AppVersion => "0.6.4.1";
public string AppVersion => "0.7.0";
public string UpdateApiUrl => "https://api.github.com/repos/Jeric-X/SyncClipboard.Desktop/releases/latest";
public string UpdateUrl => "https://github.com/Jeric-X/SyncClipboard.Desktop/releases/latest";
}
2 changes: 1 addition & 1 deletion src/SyncClipboard.Desktop/Changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0.6.4.1
0.7.0
- 功能:支持同步多个文件、文件夹,移动端体现为zip压缩文件,安卓端`HTTP Shortcuts`配置也需要更新以支持此功能
- 修复:最大上传文件大小设置项在混合模式无法设置(https://github.com/Jeric-X/SyncClipboard/issues/68)

Expand Down
2 changes: 1 addition & 1 deletion src/SyncClipboard.WinUI3/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ internal class AppConfig : IAppConfig
{
public string AppId => Env.AppId;
public string AppStringId => "SyncClipboard.WinUI";
public string AppVersion => "2.7.5.1";
public string AppVersion => "2.8.0";
public string UpdateApiUrl => "https://api.github.com/repos/Jeric-X/SyncClipboard/releases/latest";
public string UpdateUrl => "https://github.com/Jeric-X/SyncClipboard/releases/latest";
}

0 comments on commit d21098f

Please sign in to comment.