From 63788d97a7115f6e5fb44ea4b2d24004aabccc7a Mon Sep 17 00:00:00 2001 From: Razmoth <32140579+Razmoth@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:50:39 +0400 Subject: [PATCH] - [Core] duplicate file processing adjustments. --- AssetStudio.GUI/Exporter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AssetStudio.GUI/Exporter.cs b/AssetStudio.GUI/Exporter.cs index cde49b0..29086d6 100644 --- a/AssetStudio.GUI/Exporter.cs +++ b/AssetStudio.GUI/Exporter.cs @@ -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)) @@ -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))