Skip to content

Commit

Permalink
Fix pattern for getting same name files (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanish-kh authored Sep 25, 2023
1 parent f2610d5 commit 7d0f945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WingetCreateCore/Common/PackageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 7d0f945

Please sign in to comment.