From d5295842d77dc2b73524ff50b8eb59c89b0ebfdd Mon Sep 17 00:00:00 2001 From: t0815 <10379828+t0815@users.noreply.github.com> Date: Sat, 9 Nov 2024 10:41:47 +0100 Subject: [PATCH] fix saving fails if project contains a pasted page [#61] --- MyCBZ/App.config | 2 +- MyCBZ/Models/ProjectModel.cs | 24 +++++++++++++++--------- MyCBZ/Properties/AssemblyInfo.cs | 4 ++-- MyCBZ/Win_CBZ.csproj.user | 5 +++++ MyCBZ/Win_CBZSettings.Designer.cs | 2 +- MyCBZ/Win_CBZSettings.settings | 2 +- Readme.md | 2 +- Win_CBZ-Setup/Win_CBZ-Setup.vdproj | 6 +++--- 8 files changed, 29 insertions(+), 18 deletions(-) diff --git a/MyCBZ/App.config b/MyCBZ/App.config index c7cb2a7..15c2b71 100644 --- a/MyCBZ/App.config +++ b/MyCBZ/App.config @@ -183,7 +183,7 @@ - 0.22.184b + 0.22.185b diff --git a/MyCBZ/Models/ProjectModel.cs b/MyCBZ/Models/ProjectModel.cs index a13baea..3b535a1 100644 --- a/MyCBZ/Models/ProjectModel.cs +++ b/MyCBZ/Models/ProjectModel.cs @@ -1338,22 +1338,28 @@ protected void SaveArchiveProc(object threadParams) if (page.Changed || page.Compressed) { - sourceFileName = page.TemporaryFile.FullPath; - try + if (page.TemporaryFile != null) { - if (!page.TemporaryFile.Exists()) + sourceFileName = page.TemporaryFile.FullPath; + try { - page.CreateLocalWorkingCopy(); + if (!page.TemporaryFile.Exists()) + { + page.CreateLocalWorkingCopy(); + } } - } - catch (Exception) - { + catch (Exception) + { - sourceFileName = page.TemporaryFile.FullPath; + sourceFileName = page.TemporaryFile.FullPath; - //MessageLogger.Instance.Log(LogMessageEvent.LOGMESSAGE_TYPE_WARNING, "Failed to open temporary file! ["+ex.Message+"] Compressing original file [" + page.LocalFile.FullPath + "] instead of [" + page.TempPath + "]"); + //MessageLogger.Instance.Log(LogMessageEvent.LOGMESSAGE_TYPE_WARNING, "Failed to open temporary file! ["+ex.Message+"] Compressing original file [" + page.LocalFile.FullPath + "] instead of [" + page.TempPath + "]"); + } + } else + { + sourceFileName = page.LocalFile.FullPath; } } else diff --git a/MyCBZ/Properties/AssemblyInfo.cs b/MyCBZ/Properties/AssemblyInfo.cs index 7412dd7..8fee01b 100644 --- a/MyCBZ/Properties/AssemblyInfo.cs +++ b/MyCBZ/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.22.184")] -[assembly: AssemblyFileVersion("0.22.184")] +[assembly: AssemblyVersion("0.22.185")] +[assembly: AssemblyFileVersion("0.22.185")] [assembly: NeutralResourcesLanguage("en")] diff --git a/MyCBZ/Win_CBZ.csproj.user b/MyCBZ/Win_CBZ.csproj.user index 79f9551..bb03b1b 100644 --- a/MyCBZ/Win_CBZ.csproj.user +++ b/MyCBZ/Win_CBZ.csproj.user @@ -69,6 +69,11 @@ Form + + + Designer + + Designer diff --git a/MyCBZ/Win_CBZSettings.Designer.cs b/MyCBZ/Win_CBZSettings.Designer.cs index 942b079..de28aee 100644 --- a/MyCBZ/Win_CBZSettings.Designer.cs +++ b/MyCBZ/Win_CBZSettings.Designer.cs @@ -37,7 +37,7 @@ public string TempFolderPath { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0.22.184b")] + [global::System.Configuration.DefaultSettingValueAttribute("0.22.185b")] public string InstalledVersion { get { return ((string)(this["InstalledVersion"])); diff --git a/MyCBZ/Win_CBZSettings.settings b/MyCBZ/Win_CBZSettings.settings index a47defc..828d991 100644 --- a/MyCBZ/Win_CBZSettings.settings +++ b/MyCBZ/Win_CBZSettings.settings @@ -6,7 +6,7 @@ %APPDATA%\WIN_CBZ\Temp\ - 0.22.184b + 0.22.185b <?xml version="1.0" encoding="utf-16"?> diff --git a/Readme.md b/Readme.md index 10e4e1a..bf5fade 100644 --- a/Readme.md +++ b/Readme.md @@ -53,7 +53,7 @@ Microsoft Visual Studio [Community] 2022 (64-Bit) ## Latest Release -v0.22.184b released! +v0.22.185b released! >[!IMPORTANT] diff --git a/Win_CBZ-Setup/Win_CBZ-Setup.vdproj b/Win_CBZ-Setup/Win_CBZ-Setup.vdproj index 9090c6f..f6ee768 100644 --- a/Win_CBZ-Setup/Win_CBZ-Setup.vdproj +++ b/Win_CBZ-Setup/Win_CBZ-Setup.vdproj @@ -248,15 +248,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Win_CBZ" - "ProductCode" = "8:{D5408170-9245-4797-849D-707BA22B1D02}" - "PackageCode" = "8:{90F9A60D-495D-4284-96F2-8DCB1A951126}" + "ProductCode" = "8:{9B2A0426-86AC-4F40-A92B-0C6D7F09E70D}" + "PackageCode" = "8:{9F2F699A-1570-4706-8F35-71C833415E10}" "UpgradeCode" = "8:{66FAEF81-1CAE-4971-9E0F-796310EFEA5E}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:0.22.184" + "ProductVersion" = "8:0.22.185" "Manufacturer" = "8:Trash_s0Ft" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:"