Linux/macOS: enable quick format for file containers

Allow normal file-hosted containers to use quick format in the Unix volume creation path by sizing the host file with ftruncate before backup headers are written.

Enable the GUI checkbox for normal file containers and honor --quick in text mode. Update the Unix HTML documentation for the weaker deniability properties of sparse or unwritten host regions.
This commit is contained in:
Mounir IDRASSI
2026-05-21 16:17:52 +09:00
parent 1fd2fb06cd
commit 79bee911be
10 changed files with 67 additions and 12 deletions

View File

@@ -253,7 +253,17 @@ namespace VeraCrypt
(options->Path.IsDevice() || options->Type == VolumeType::Hidden) ? File::OpenReadWrite : File::CreateReadWrite,
File::ShareNone);
HostSize = VolumeFile->Length();
if (!options->Path.IsDevice() && options->Type == VolumeType::Normal)
{
HostSize = options->Size;
if (options->Quick)
VolumeFile->SetLength (options->Size);
}
else
{
HostSize = VolumeFile->Length();
}
}
try