UNIX: make sector size mismatch error more verbose (#552) (#561)

Signed-off-by: alt3r 3go <alt3r.3go@protonmail.com>
This commit is contained in:
alt3r 3go authored and Mounir IDRASSI committed 2019-12-01 14:26:38 +01:00
1 parent b233e6776b
commit 1fd212016e
4 files changed
+8 -2

No files matched your search

+4 -2
View File
@@ -473,8 +473,10 @@ namespace VeraCrypt
if (options.Path->IsDevice())
{
if (volume->GetFile()->GetDeviceSectorSize() != volume->GetSectorSize())
throw ParameterIncorrect (SRC_POS);
const uint32 devSectorSize = volume->GetFile()->GetDeviceSectorSize();
const size_t volSectorSize = volume->GetSectorSize();
if (devSectorSize != volSectorSize)
throw DeviceSectorSizeMismatch (SRC_POS, StringConverter::ToWide(devSectorSize) + L" != " + StringConverter::ToWide(volSectorSize));
}
// Find a free mount point for FUSE service