Skip to content

Commit

Permalink
fix error saving archive, if page order has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
t0815 committed Nov 3, 2024
1 parent 89192cc commit c971632
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 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.182b</value>
<value>0.22.183b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
8 changes: 5 additions & 3 deletions MyCBZ/Models/ProjectModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,8 @@ public bool SaveAs(String path, ZipArchiveMode mode, MetaData.PageIndexVersion m
bool updateIndexMetadata = false;
int checkIndex = 0;

AppEventHandler.OnArchiveStatusChanged(this, new ArchiveStatusEvent(this, ArchiveStatusEvent.ARCHIVE_SAVING));

if (GlobalImageTask != null &&
(GlobalImageTask.ImageAdjustments.ConvertType > 0 ||
GlobalImageTask.ImageAdjustments.SplitPage ||
Expand All @@ -1184,9 +1186,9 @@ public bool SaveAs(String path, ZipArchiveMode mode, MetaData.PageIndexVersion m
applyImageProcessing = true;
}

if (MetaData.FindIndexEntryForPage(page).GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_WIDTH) != page.Format.W.ToString() ||
MetaData.FindIndexEntryForPage(page).GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_HEIGHT) != page.Format.H.ToString() ||
MetaData.FindIndexEntryForPage(page).GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_SIZE) != page.Size.ToString())
if (MetaData.FindIndexEntryForPage(page)?.GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_WIDTH) != page.Format.W.ToString() ||
MetaData.FindIndexEntryForPage(page)?.GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_HEIGHT) != page.Format.H.ToString() ||
MetaData.FindIndexEntryForPage(page)?.GetAttribute(MetaDataEntryPage.COMIC_PAGE_ATTRIBUTE_IMAGE_SIZE) != page.Size.ToString())
{
updateIndexMetadata = true;
}
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.182")]
[assembly: AssemblyFileVersion("0.22.182")]
[assembly: AssemblyVersion("0.22.183")]
[assembly: AssemblyFileVersion("0.22.183")]
[assembly: NeutralResourcesLanguage("en")]
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.182b</Value>
<Value Profile="(Default)">0.22.183b</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.182b released!
v0.22.183b 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:{817C4590-F3B0-4C5E-8FE5-21C5DB86B39D}"
"PackageCode" = "8:{D0FEB7A2-3DFE-4E28-B5F3-FC00E623D301}"
"ProductCode" = "8:{95B19F0F-87F9-4126-BE56-44A3F111B11A}"
"PackageCode" = "8:{24B02EBD-C3E1-48DF-963A-8F275BF4E70C}"
"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.182"
"ProductVersion" = "8:0.22.183"
"Manufacturer" = "8:Trash_s0Ft"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit c971632

Please sign in to comment.