This commit is contained in:
Natsumi
2022-03-13 20:36:57 +13:00
parent ef195d8b33
commit 23c12024f4

View File

@@ -3,10 +3,8 @@
// This work is licensed under the terms of the MIT license. // This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>. // For a copy, see <https://opensource.org/licenses/MIT>.
using Microsoft.Win32;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Text.RegularExpressions;
using System.IO; using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Net; using System.Net;
@@ -168,11 +166,11 @@ namespace VRCX
if (client != null) if (client != null)
{ {
client.CancelAsync(); client.CancelAsync();
} }
if (process != null && !process.HasExited) if (process != null && !process.HasExited)
{ {
process.Kill(); process.Kill();
if (File.Exists(DownloadTempLocation)) if (File.Exists(DownloadTempLocation))
File.Delete(DownloadTempLocation); File.Delete(DownloadTempLocation);
if (Directory.Exists(Path.Combine(AssetBundleCacherTemp, AssetId))) if (Directory.Exists(Path.Combine(AssetBundleCacherTemp, AssetId)))
Directory.Delete(Path.Combine(AssetBundleCacherTemp, AssetId), true); Directory.Delete(Path.Combine(AssetBundleCacherTemp, AssetId), true);