bump fix for file not existing (patcher)

This commit is contained in:
CWX 2022-06-21 19:51:26 +01:00
parent c55e5c8f1f
commit 9c3ab1bad9
3 changed files with 13 additions and 9 deletions

View File

@ -75,7 +75,7 @@ namespace SPT_AKI_Installer.Aki.Core
PreCheckHelper.PatcherZipCheck(originalGamePath, targetPath, out patcherZipPath); PreCheckHelper.PatcherZipCheck(originalGamePath, targetPath, out patcherZipPath);
PreCheckHelper.AkiZipCheck(targetPath, out akiZipPath); PreCheckHelper.AkiZipCheck(targetPath, out akiZipPath);
LogHelper.Info("Copying game files");
GameCopy(originalGamePath, targetPath); GameCopy(originalGamePath, targetPath);
@ -91,12 +91,13 @@ namespace SPT_AKI_Installer.Aki.Core
static void GameCopy(string originalGamePath, string targetPath) static void GameCopy(string originalGamePath, string targetPath)
{ {
LogHelper.Info("Copying game files");
FileHelper.CopyDirectory(originalGamePath, targetPath, true); FileHelper.CopyDirectory(originalGamePath, targetPath, true);
LogHelper.Info("Extracting patcher");
} }
static void PatcherCopy(string targetPath, string patcherZipPath) static void PatcherCopy(string targetPath, string patcherZipPath)
{ {
LogHelper.Info("Extracting patcher");
ZipHelper.ZipDecompress(patcherZipPath, targetPath); ZipHelper.ZipDecompress(patcherZipPath, targetPath);
FileHelper.FindFolder(patcherZipPath, targetPath, out DirectoryInfo dir); FileHelper.FindFolder(patcherZipPath, targetPath, out DirectoryInfo dir);
FileHelper.CopyDirectory(dir.FullName, targetPath, true); FileHelper.CopyDirectory(dir.FullName, targetPath, true);

View File

@ -34,6 +34,8 @@ namespace SPT_AKI_Installer.Aki.Helper
} }
public static void DeleteFiles(string filePath, bool allFolders = false) public static void DeleteFiles(string filePath, bool allFolders = false)
{
if (File.Exists(filePath) || Directory.Exists(filePath))
{ {
if (filePath.Contains('.')) if (filePath.Contains('.'))
{ {
@ -44,6 +46,7 @@ namespace SPT_AKI_Installer.Aki.Helper
Directory.Delete(filePath, allFolders); Directory.Delete(filePath, allFolders);
} }
} }
}
public static string FindFile(string path, string name) public static string FindFile(string path, string name)
{ {

View File

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<History>True|2022-06-06T14:07:18.8067168Z;True|2022-06-05T22:55:20.5192697+01:00;True|2022-05-30T13:11:30.6942032+01:00;True|2022-05-30T13:08:08.4269393+01:00;True|2022-05-17T01:06:33.6758525+01:00;True|2022-05-14T01:56:09.8410037+01:00;True|2022-05-14T00:54:24.0683990+01:00;True|2022-05-14T00:53:04.7105427+01:00;True|2022-05-14T00:51:00.6280767+01:00;True|2022-05-14T00:49:19.4630888+01:00;True|2022-05-14T00:47:59.2166156+01:00;</History> <History>True|2022-06-21T18:47:38.7532473Z;True|2022-06-08T18:26:47.7977621+01:00;True|2022-06-06T15:07:18.8067168+01:00;True|2022-06-05T22:55:20.5192697+01:00;True|2022-05-30T13:11:30.6942032+01:00;True|2022-05-30T13:08:08.4269393+01:00;True|2022-05-17T01:06:33.6758525+01:00;True|2022-05-14T01:56:09.8410037+01:00;True|2022-05-14T00:54:24.0683990+01:00;True|2022-05-14T00:53:04.7105427+01:00;True|2022-05-14T00:51:00.6280767+01:00;True|2022-05-14T00:49:19.4630888+01:00;True|2022-05-14T00:47:59.2166156+01:00;</History>
</PropertyGroup> </PropertyGroup>
</Project> </Project>