diff --git a/rename-ue-project/Program.cs b/rename-ue-project/Program.cs index 055a420..e3885e5 100644 --- a/rename-ue-project/Program.cs +++ b/rename-ue-project/Program.cs @@ -6,7 +6,7 @@ namespace rename_ue_project { const string UE_PROJECT_EXTENSION = ".uproject"; const string GITIGNORE = ".gitignore"; - const string README = "READ.ME"; + const string README = "README.md"; const string CONFIG_FOLDER = "config"; const string DEGAULT_GAME_INI = "DefaultGame.ini"; @@ -93,8 +93,10 @@ namespace rename_ue_project private static async Task updateIgnore(string projectPath, string projectName, string oldFile) { - var ignoreContent = await File.ReadAllTextAsync(Path.Combine(projectPath, GITIGNORE)); - ignoreContent = ignoreContent.Replace(Path.GetFileName(oldFile), projectName); + var ignorePath = Path.Combine(projectPath, GITIGNORE); + var ignoreContent = await File.ReadAllTextAsync(ignorePath); + ignoreContent = ignoreContent.Replace(Path.GetFileNameWithoutExtension(oldFile), projectName); + await File.WriteAllTextAsync(ignorePath, ignoreContent); Console.WriteLine("Replaced project name in gitignore"); }