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:
parent
cfcadc80b0
commit
d1eab39b4a
2 changed files with 5 additions and 5 deletions
|
@ -75,12 +75,12 @@ namespace nxDumpFuse.Model
|
||||||
}
|
}
|
||||||
|
|
||||||
var inputFiles = GetInputFiles();
|
var inputFiles = GetInputFiles();
|
||||||
if (inputFiles.Length == 0)
|
if (inputFiles.Count == 0)
|
||||||
{
|
{
|
||||||
Log(FuseSimpleLogType.Error, "No input files found");
|
Log(FuseSimpleLogType.Error, "No input files found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
inputFiles.Sort();
|
||||||
FuseFiles(inputFiles, _outputFilePath);
|
FuseFiles(inputFiles, _outputFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,11 +186,11 @@ namespace nxDumpFuse.Model
|
||||||
return totalFileSize;
|
return totalFileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string[] GetInputFiles()
|
private List<string> GetInputFiles()
|
||||||
{
|
{
|
||||||
var inputDir = Path.GetDirectoryName(_inputFilePath);
|
var inputDir = Path.GetDirectoryName(_inputFilePath);
|
||||||
if (string.IsNullOrEmpty(inputDir)) inputDir = Path.GetPathRoot(_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()
|
public void StopFuse()
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<Button Grid.Column="1" Command="{Binding ClearLogCommand}" Content="Clear" HorizontalAlignment="Stretch"
|
<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>
|
</Grid>
|
||||||
|
|
||||||
</Expander>
|
</Expander>
|
||||||
|
|
Loading…
Reference in a new issue