Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
- [Core] duplicate file processing adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Razmoth committed Jan 20, 2024
1 parent c73d81c commit 63788d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AssetStudio.GUI/Exporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private static bool TryExportFile(string dir, AssetItem item, string extension,
}
if (Properties.Settings.Default.allowDuplicates)
{
for (int i = 0; ; i++)
for (int i = 1; i < int.MaxValue; i++)
{
fullPath = Path.Combine(dir, $"{fileName} ({i}){extension}");
if (!File.Exists(fullPath))
Expand All @@ -329,7 +329,7 @@ private static bool TryExportFolder(string dir, AssetItem item, out string fullP
}
if (Properties.Settings.Default.allowDuplicates)
{
for (int i = 0; ; i++)
for (int i = 1; i < int.MaxValue; i++)
{
fullPath = Path.Combine(dir, $"{fileName} ({i})");
if (!Directory.Exists(fullPath))
Expand Down

0 comments on commit 63788d9

Please sign in to comment.