mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Take care of listing devices on Linux when model is null.
This commit is contained in:
@@ -101,11 +101,14 @@ namespace DiscImageChef.Devices.Linux
|
|||||||
|
|
||||||
if(string.IsNullOrEmpty(devices[i].vendor) || devices[i].vendor == "ATA")
|
if(string.IsNullOrEmpty(devices[i].vendor) || devices[i].vendor == "ATA")
|
||||||
{
|
{
|
||||||
string[] pieces = devices[i].model.Split(' ');
|
if(devices[i].model != null)
|
||||||
if(pieces.Length > 1)
|
|
||||||
{
|
{
|
||||||
devices[i].vendor = pieces[0];
|
string[] pieces = devices[i].model.Split(' ');
|
||||||
devices[i].model = devices[i].model.Substring(pieces[0].Length + 1);
|
if(pieces.Length > 1)
|
||||||
|
{
|
||||||
|
devices[i].vendor = pieces[0];
|
||||||
|
devices[i].model = devices[i].model.Substring(pieces[0].Length + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user