Fix duplicate entries warning
If generated sources already exist don't add them to _outputFiles.
This commit is contained in:
parent
c83f21e932
commit
17671611b2
1 changed files with 13 additions and 4 deletions
|
@ -55,9 +55,21 @@ 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);
|
||||
|
||||
if (addToOutputFiles)
|
||||
{
|
||||
_outputFiles.Add(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
private HashSet<int> GetArraySizes(string itemPath)
|
||||
{
|
||||
|
@ -174,9 +186,6 @@ namespace Ryujinx.CustomTasks
|
|||
string arraysFilePath = Path.Combine(OutputPath, ArraysFileName);
|
||||
List<int> arraySizes = new List<int>();
|
||||
|
||||
File.Delete(interfaceFilePath);
|
||||
File.Delete(arraysFilePath);
|
||||
|
||||
foreach (var item in InputFiles)
|
||||
{
|
||||
string fullPath = item.GetMetadata("FullPath");
|
||||
|
|
Loading…
Add table
Reference in a new issue