Skip to content

Commit

Permalink
fix saving fails if project contains a pasted page [#61]
Browse files Browse the repository at this point in the history
  • Loading branch information
t0815 committed Nov 9, 2024
1 parent 497a43b commit d529584
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 18 deletions.
2 changes: 1 addition & 1 deletion MyCBZ/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<applicationSettings>
<Win_CBZ.Win_CBZSettings>
<setting name="InstalledVersion" serializeAs="String">
<value>0.22.184b</value>
<value>0.22.185b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
24 changes: 15 additions & 9 deletions MyCBZ/Models/ProjectModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions MyCBZ/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
5 changes: 5 additions & 0 deletions MyCBZ/Win_CBZ.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Update="Resources\defaults.xsl">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Forms\MainForm.resx">
<SubType>Designer</SubType>
Expand Down
2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Value Profile="(Default)">%APPDATA%\WIN_CBZ\Temp\</Value>
</Setting>
<Setting Name="InstalledVersion" Type="System.String" Scope="Application">
<Value Profile="(Default)">0.22.184b</Value>
<Value Profile="(Default)">0.22.185b</Value>
</Setting>
<Setting Name="RenamerPlaceholders" Type="System.Collections.Specialized.StringCollection" Scope="Application">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Microsoft Visual Studio [Community] 2022 (64-Bit)

## Latest Release

v0.22.184b released!
v0.22.185b released!


>[!IMPORTANT]
Expand Down
6 changes: 3 additions & 3 deletions Win_CBZ-Setup/Win_CBZ-Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down

0 comments on commit d529584

Please sign in to comment.