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,8 +55,20 @@ namespace Ryujinx.CustomTasks
|
||||||
|
|
||||||
private void AddGeneratedSource(string filePath, string content)
|
private void AddGeneratedSource(string filePath, string content)
|
||||||
{
|
{
|
||||||
|
bool addToOutputFiles = true;
|
||||||
|
|
||||||
|
if (File.Exists(filePath))
|
||||||
|
{
|
||||||
|
File.Delete(filePath);
|
||||||
|
addToOutputFiles = false;
|
||||||
|
}
|
||||||
|
|
||||||
File.WriteAllText(filePath, content);
|
File.WriteAllText(filePath, content);
|
||||||
_outputFiles.Add(filePath);
|
|
||||||
|
if (addToOutputFiles)
|
||||||
|
{
|
||||||
|
_outputFiles.Add(filePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashSet<int> GetArraySizes(string itemPath)
|
private HashSet<int> GetArraySizes(string itemPath)
|
||||||
|
@ -174,9 +186,6 @@ namespace Ryujinx.CustomTasks
|
||||||
string arraysFilePath = Path.Combine(OutputPath, ArraysFileName);
|
string arraysFilePath = Path.Combine(OutputPath, ArraysFileName);
|
||||||
List<int> arraySizes = new List<int>();
|
List<int> arraySizes = new List<int>();
|
||||||
|
|
||||||
File.Delete(interfaceFilePath);
|
|
||||||
File.Delete(arraysFilePath);
|
|
||||||
|
|
||||||
foreach (var item in InputFiles)
|
foreach (var item in InputFiles)
|
||||||
{
|
{
|
||||||
string fullPath = item.GetMetadata("FullPath");
|
string fullPath = item.GetMetadata("FullPath");
|
||||||
|
|
Loading…
Add table
Reference in a new issue