diff --git a/Application/FileConverter/ValueConverters/FileNameConverter.cs b/Application/FileConverter/ValueConverters/FileNameConverter.cs index b348b1c..bd36407 100644 --- a/Application/FileConverter/ValueConverters/FileNameConverter.cs +++ b/Application/FileConverter/ValueConverters/FileNameConverter.cs @@ -41,8 +41,12 @@ namespace FileConverter.ValueConverters string fileName = System.IO.Path.GetFileName(inputPathWithoutExtension); string parentDirectory = System.IO.Path.GetDirectoryName(inputPathWithoutExtension); - string[] directories = parentDirectory.Split(System.IO.Path.DirectorySeparatorChar); - parentDirectory += System.IO.Path.DirectorySeparatorChar; + if (!parentDirectory.EndsWith(System.IO.Path.DirectorySeparatorChar.ToString())) + { + parentDirectory += System.IO.Path.DirectorySeparatorChar; + } + + string[] directories = parentDirectory.Substring(0, parentDirectory.Length - 1).Split(System.IO.Path.DirectorySeparatorChar); // Generate output path from template. string outputPath = outputFileTemplate; diff --git a/CHANGELOG.md b/CHANGELOG.md index d4e31f0..5f9bb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Fixed: Issue where conversion progress was not updated correctly (for converters based on ffmpeg). - Fixed: Issue where converting a video into the ogg format did not extract audio in an ogg file correctly. - Fixed: Issue where simultaneous read on the same CD drive was performed when files from differents conversions come from the same drive (other than cda extraction preset). +- Fixed: Issue where the path generator was unable to create a valid path if the input file was at the root of a drive. - Tech: Annotate the conversion presets to know if there are default preset or user preset in order to improve the upgrade process. ## Version 0.6