mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-30 23:13:31 +01:00
Linux: Only add disk to mountable devices if it doesn't have a partition. This fixes a strange issue where the function "open" would fail with error ENOENT (No such file or directory) on a partition (e.g. /dev/sdb1) if it was called previously on the main disk (e.g. /dev/sdb).
This commit is contained in:
parent
ee6da31fb6
commit
668d5e3cad
@ -596,10 +596,13 @@ namespace VeraCrypt
|
|||||||
HostDeviceList devices;
|
HostDeviceList devices;
|
||||||
foreach (shared_ptr <HostDevice> device, Core->GetHostDevices (true))
|
foreach (shared_ptr <HostDevice> device, Core->GetHostDevices (true))
|
||||||
{
|
{
|
||||||
devices.push_back (device);
|
if (device->Partitions.empty())
|
||||||
|
devices.push_back (device);
|
||||||
foreach (shared_ptr <HostDevice> partition, device->Partitions)
|
else
|
||||||
devices.push_back (partition);
|
{
|
||||||
|
foreach (shared_ptr <HostDevice> partition, device->Partitions)
|
||||||
|
devices.push_back (partition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set <wstring> mountedVolumes;
|
set <wstring> mountedVolumes;
|
||||||
|
Loading…
Reference in New Issue
Block a user