Skip to content

Commit b7c3776

Browse files
committed
Do not save processed tiles if nothing was changed
1 parent 9de13d0 commit b7c3776

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

BatchTMPConverter/BatchTMPConverter.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public void ProcessTiles()
118118
{
119119
bool allowNoConvert = fixZData;
120120
bool skipConvert = false;
121+
bool altered = false;
121122

122123
if (!palette.Loaded)
123124
{
@@ -206,14 +207,19 @@ public void ProcessTiles()
206207
continue;
207208
}
208209

210+
altered = true;
211+
209212
if (imageFilename != actualImageFilename)
210213
File.Delete(actualImageFilename);
211214
}
212215

213216
if (fixZData)
217+
{
214218
tmp.FixZData();
219+
altered = true;
220+
}
215221

216-
if (tmp.Save(supressBackups) && !skipConvert)
222+
if (altered && tmp.Save(supressBackups) && !skipConvert)
217223
processedFilesLog?.UpdateOrAddFile(imageFilename);
218224
}
219225

BatchTMPConverter/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("4.0.0.0")]
37-
[assembly: AssemblyFileVersion("4.0.0.0")]
36+
[assembly: AssemblyVersion("4.0.0.1")]
37+
[assembly: AssemblyFileVersion("4.0.0.1")]
3838
[assembly: NeutralResourcesLanguageAttribute("")]

0 commit comments

Comments
 (0)