diff --git a/IsoMaker/IsoMaker/Form1.cs b/IsoMaker/IsoMaker/Form1.cs index e0296a3..2a6c83d 100644 --- a/IsoMaker/IsoMaker/Form1.cs +++ b/IsoMaker/IsoMaker/Form1.cs @@ -46,7 +46,13 @@ private Dictionary getFileList(DirectoryInfo folder, DirectoryIn foreach (FileInfo file in folder.GetFiles()) { string fileFullPath = file.FullName; - string fileOnIso = fileFullPath.TrimStart(home.FullName.ToCharArray()); + + // The code below might chop off too much of the string. I had this issue. + // string fileOnIso = fileFullPath.TrimStart(home.FullName.ToCharArray()); + + // This code simply delimits the string by the root directory path with a backslash. This works better. + string fileOnIso = fileFullPath.Split(home.FullName + '\\')[1]; + output.Add(fileOnIso, file.FullName); }