Use relative path output for DIC

This commit is contained in:
Matt Nadareski
2023-02-23 15:22:21 -05:00
parent f90d19821c
commit 391d265353
2 changed files with 4 additions and 3 deletions

View File

@@ -46,6 +46,7 @@
- Fix relative paths for DIC
- Add nicer failure message
- Update to DIC 20230201
- Use relative path output for DIC
### 2.4 (2022-10-26)

View File

@@ -126,15 +126,15 @@ namespace MPF.Library
string outputPath = InfoTool.NormalizeOutputPaths(this.OutputPath);
// Replace all instances in the output directory
string outputDirectory = Path.GetDirectoryName(this.OutputPath);
string outputDirectory = Path.GetDirectoryName(outputPath);
outputDirectory = outputDirectory.Replace(".", "_");
// Replace all instances in the output filename
string outputFilename = Path.GetFileNameWithoutExtension(this.OutputPath);
string outputFilename = Path.GetFileNameWithoutExtension(outputPath);
outputFilename = outputFilename.Replace(".", "_");
// Get the extension for recreating the path
string outputExtension = Path.GetExtension(this.OutputPath).TrimStart('.');
string outputExtension = Path.GetExtension(outputPath).TrimStart('.');
// Rebuild the output path
this.OutputPath = Path.Combine(outputDirectory, $"{outputFilename}.{outputExtension}");