mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-22 20:41:31 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user