Do not try to split null model on Windows device listing. Fixes #199

This commit is contained in:
2018-09-25 22:35:47 +01:00
parent ce947424c8
commit fba0ecfa3a
2 changed files with 9 additions and 7 deletions

View File

@@ -7,6 +7,9 @@
<e p="$USER_HOME$/.Rider2018.2/system/resharper-host/local/Transient/ReSharperHost/v182/SolutionCaches/_DiscImageChef.73225794.00" t="ExcludeRecursive" />
<e p="$USER_HOME$/.nuget/packages/sqlitepclraw.lib.e_sqlite3.linux/1.1.11/runtimes/linux-x64/native/libe_sqlite3.so" t="Include" />
<e p="$PROJECT_DIR$" t="IncludeFlat">
<e p=".git/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/CICMMetadata/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/cuetoolsnet/info/exclude" t="IncludeRecursive" />
<e p=".github/CODE_OF_CONDUCT.md" t="Include" />
<e p=".github/ISSUE_TEMPLATE.md" t="Include" />
<e p=".github/PULL_REQUEST_TEMPLATE.md" t="Include" />
@@ -1312,7 +1315,6 @@
<e p="Logos" t="Include">
<e p="Media" t="Include">
<e p=".directory" t="Include" />
<e p="360DVDfirmwareRelatedInfo.pdf" t="Include" />
<e p="AIT1.png" t="Include" />
<e p="AIT1.svg" t="Include" />
<e p="AIT1Turbo.png" t="Include" />

View File

@@ -34,12 +34,12 @@ using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
#if !NETSTANDARD2_0
using System.Management;
#endif
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
#if !NETSTANDARD2_0
using System.Management;
#endif
namespace DiscImageChef.Devices.Windows
{
@@ -96,7 +96,7 @@ namespace DiscImageChef.Devices.Windows
throw;
#else
return null;
#endif
#endif
}
#endif
@@ -172,7 +172,7 @@ namespace DiscImageChef.Devices.Windows
info.Serial.Length == 40) info.Serial = HexStringToString(info.Serial).Trim();
}
if(string.IsNullOrEmpty(info.Vendor) || info.Vendor == "ATA")
if((string.IsNullOrEmpty(info.Vendor) || info.Vendor == "ATA") && info.Model != null)
{
string[] pieces = info.Model.Split(' ');
if(pieces.Length > 1)