From d85186e5cd29f21f93b135a56f80dc58d4da5aaa Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 19 Jul 2018 23:40:17 -0700 Subject: [PATCH] Fix copy protection output again This doesn't warrant a full PR --- DICUI/Utilities/DumpEnvironment.cs | 6 ++---- DICUI/Utilities/Validators.cs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/DICUI/Utilities/DumpEnvironment.cs b/DICUI/Utilities/DumpEnvironment.cs index 7d5dc459..34310401 100644 --- a/DICUI/Utilities/DumpEnvironment.cs +++ b/DICUI/Utilities/DumpEnvironment.cs @@ -410,8 +410,7 @@ namespace DICUI.Utilities case KnownSystem.IBMPCCompatible: case KnownSystem.RainbowDisc: mappings[Template.ISBNField] = Template.OptionalValue; - string protection = GetCopyProtection(); - mappings[Template.CopyProtectionField] = (!String.IsNullOrWhiteSpace(protection) ? protection : Template.RequiredIfExistsValue); + mappings[Template.CopyProtectionField] = GetCopyProtection(); if (File.Exists(combinedBase + "_subIntention.txt")) { FileInfo fi = new FileInfo(combinedBase + "_subIntention.txt"); @@ -511,8 +510,7 @@ namespace DICUI.Utilities case KnownSystem.IBMPCCompatible: case KnownSystem.RainbowDisc: mappings[Template.ISBNField] = Template.OptionalValue; - string protection = GetCopyProtection(); - mappings[Template.CopyProtectionField] = (!String.IsNullOrWhiteSpace(protection) ? protection : Template.RequiredIfExistsValue); + mappings[Template.CopyProtectionField] = GetCopyProtection(); if (File.Exists(combinedBase + "_subIntention.txt")) { FileInfo fi = new FileInfo(combinedBase + "_subIntention.txt"); diff --git a/DICUI/Utilities/Validators.cs b/DICUI/Utilities/Validators.cs index e4fde132..2e1281c0 100644 --- a/DICUI/Utilities/Validators.cs +++ b/DICUI/Utilities/Validators.cs @@ -575,7 +575,7 @@ namespace DICUI.Utilities return ProtectionFind.Scan(path); }); - if (found == null) + if (found == null || found.Count == 0) return "None found"; return string.Join("\n", found.Select(kvp => kvp.Key + ": " + kvp.Value).ToArray());