From 8ef7543cf14c4fa7d2e0a9a366cbff6a6b9fa13d Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 16 Jun 2025 09:26:56 -0400 Subject: [PATCH] Ignore volume labels with path separators --- CHANGELIST.md | 1 + MPF.Frontend/Tools/SubmissionGenerator.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELIST.md b/CHANGELIST.md index fc474e4a..2a7ede9b 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -2,6 +2,7 @@ - Handle layers for PS3CFW - Further clarify configuration requirements for CLI +- Ignore volume labels with path separators ### 3.3.2 (2025-06-12) diff --git a/MPF.Frontend/Tools/SubmissionGenerator.cs b/MPF.Frontend/Tools/SubmissionGenerator.cs index 1e56b032..f8dee421 100644 --- a/MPF.Frontend/Tools/SubmissionGenerator.cs +++ b/MPF.Frontend/Tools/SubmissionGenerator.cs @@ -459,6 +459,11 @@ namespace MPF.Frontend.Tools if (driveLabel != null && driveLabel.Length == 0) driveLabel = null; + // Treat "path" labels as null -- Indicates a mounted path + // This can over-match if a label contains a directory separator somehow + if (driveLabel != null && (driveLabel.Contains("/") || driveLabel.Contains("\\"))) + driveLabel = null; + // Must have at least one label to format if (driveLabel == null && (labels == null || labels.Count == 0)) return null;