From d6be0a41543396d31b5bb93cc913efd6eed83f98 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 25 Jul 2022 09:38:02 -0700 Subject: [PATCH] Trim leading file paths for XBONE (fixes #394) --- CHANGELIST.md | 1 + MPF.Library/InfoTool.cs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 3eb68714..36ab849c 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -98,6 +98,7 @@ - Update to DIC 20220707 - Fix .bin file paths; update internal filename generation - Disable nonstandard BD-ROM sizes +- Trim leading file paths for XBONE ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Library/InfoTool.cs b/MPF.Library/InfoTool.cs index 45dda399..28611aaa 100644 --- a/MPF.Library/InfoTool.cs +++ b/MPF.Library/InfoTool.cs @@ -315,7 +315,10 @@ namespace MPF.Library case RedumpSystem.MicrosoftXboxOne: string xboxOneMsxcPath = Path.Combine($"{drive.Letter}:\\", "MSXC"); if (drive != null && Directory.Exists(xboxOneMsxcPath)) - info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Filename] = string.Join("\n", Directory.GetFiles(xboxOneMsxcPath, "*", SearchOption.TopDirectoryOnly)); + { + info.CommonDiscInfo.CommentsSpecialFields[SiteCode.Filename] = string.Join("\n", + Directory.GetFiles(xboxOneMsxcPath, "*", SearchOption.TopDirectoryOnly).Select(Path.GetFileName)); + } break;