diff --git a/Ryujinx.CustomTasks/GenerateArrays.cs b/Ryujinx.CustomTasks/GenerateArrays.cs index 70f91f1..267b7ad 100644 --- a/Ryujinx.CustomTasks/GenerateArrays.cs +++ b/Ryujinx.CustomTasks/GenerateArrays.cs @@ -55,8 +55,20 @@ namespace Ryujinx.CustomTasks private void AddGeneratedSource(string filePath, string content) { + bool addToOutputFiles = true; + + if (File.Exists(filePath)) + { + File.Delete(filePath); + addToOutputFiles = false; + } + File.WriteAllText(filePath, content); - _outputFiles.Add(filePath); + + if (addToOutputFiles) + { + _outputFiles.Add(filePath); + } } private HashSet GetArraySizes(string itemPath) @@ -174,9 +186,6 @@ namespace Ryujinx.CustomTasks string arraysFilePath = Path.Combine(OutputPath, ArraysFileName); List arraySizes = new List(); - File.Delete(interfaceFilePath); - File.Delete(arraysFilePath); - foreach (var item in InputFiles) { string fullPath = item.GetMetadata("FullPath");