diff --git a/src/WingetCreateCore/Common/PackageParser.cs b/src/WingetCreateCore/Common/PackageParser.cs index 68d83b8..04af7c6 100644 --- a/src/WingetCreateCore/Common/PackageParser.cs +++ b/src/WingetCreateCore/Common/PackageParser.cs @@ -181,7 +181,7 @@ public static string GetNumericFilename(string desiredPath) string fileExt = Path.GetExtension(desiredPath); string fileDir = Path.GetDirectoryName(desiredPath); DirectoryInfo dir = new DirectoryInfo(fileDir); - FileInfo[] existingFiles = dir.GetFiles(Path.ChangeExtension(fileName + "*", fileExt)); + FileInfo[] existingFiles = dir.GetFiles(fileName + "*" + fileExt); return existingFiles.Length == 0 ? Path.Combine(fileDir, fileName + fileExt) : Path.Combine(fileDir, fileName + " (" + existingFiles.Length.ToString() + ")" + fileExt); }