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:
@@ -100,6 +100,8 @@ namespace DiscImageChef.Devices.Linux
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(string.IsNullOrEmpty(devices[i].vendor) || devices[i].vendor == "ATA")
|
if(string.IsNullOrEmpty(devices[i].vendor) || devices[i].vendor == "ATA")
|
||||||
|
{
|
||||||
|
if(devices[i].model != null)
|
||||||
{
|
{
|
||||||
string[] pieces = devices[i].model.Split(' ');
|
string[] pieces = devices[i].model.Split(' ');
|
||||||
if(pieces.Length > 1)
|
if(pieces.Length > 1)
|
||||||
@@ -108,6 +110,7 @@ namespace DiscImageChef.Devices.Linux
|
|||||||
devices[i].model = devices[i].model.Substring(pieces[0].Length + 1);
|
devices[i].model = devices[i].model.Substring(pieces[0].Length + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Get better device type from sysfs paths
|
// TODO: Get better device type from sysfs paths
|
||||||
if(string.IsNullOrEmpty(devices[i].bus))
|
if(string.IsNullOrEmpty(devices[i].bus))
|
||||||
|
|||||||
Reference in New Issue
Block a user