Fix copy protection output again

This doesn't warrant a full PR
This commit is contained in:
Matt Nadareski
2018-07-19 23:40:17 -07:00
parent 1a94ad3d23
commit d85186e5cd
2 changed files with 3 additions and 5 deletions

View File

@@ -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");

View File

@@ -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());