1
0
Fork 0
mirror of https://github.com/oMaN-Rod/nxDumpFuse.git synced 2024-11-08 11:51:49 +00:00

Filter and sort inputfiles to files match input and are in the correct order

This commit is contained in:
Omar 2021-10-28 18:29:14 -04:00
parent cfcadc80b0
commit d1eab39b4a
2 changed files with 5 additions and 5 deletions

View file

@ -75,12 +75,12 @@ namespace nxDumpFuse.Model
}
var inputFiles = GetInputFiles();
if (inputFiles.Length == 0)
if (inputFiles.Count == 0)
{
Log(FuseSimpleLogType.Error, "No input files found");
return;
}
inputFiles.Sort();
FuseFiles(inputFiles, _outputFilePath);
}
@ -186,11 +186,11 @@ namespace nxDumpFuse.Model
return totalFileSize;
}
private string[] GetInputFiles()
private List<string> GetInputFiles()
{
var inputDir = Path.GetDirectoryName(_inputFilePath);
if (string.IsNullOrEmpty(inputDir)) inputDir = Path.GetPathRoot(_inputFilePath);
return inputDir != null ? Directory.GetFiles(inputDir) : new string[] { };
return inputDir != null ? Directory.GetFiles(inputDir, $"{Path.GetFileNameWithoutExtension(_inputFilePath)}*").ToList() : new List<string>();
}
public void StopFuse()

View file

@ -61,7 +61,7 @@
</DataGrid.Columns>
</DataGrid>
<Button Grid.Column="1" Command="{Binding ClearLogCommand}" Content="Clear" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center" VerticalAlignment="Top" Margin="4" />
HorizontalContentAlignment="Center" VerticalAlignment="Top" Margin=" 4 0 0 0" />
</Grid>
</Expander>