mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-09 21:22:41 +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:
@@ -766,8 +766,6 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
options->Quick = false;
|
||||
|
||||
uint32 sectorSizeRem = options->Size % options->SectorSize;
|
||||
if (sectorSizeRem != 0)
|
||||
options->Size += options->SectorSize - sectorSizeRem;
|
||||
@@ -964,6 +962,18 @@ namespace VeraCrypt
|
||||
throw_err (_("Specified volume size is too small to be used with Btrfs filesystem."));
|
||||
}
|
||||
|
||||
if (options->Quick && options->Type == VolumeType::Normal)
|
||||
{
|
||||
if (Preferences.NonInteractive)
|
||||
{
|
||||
ShowWarning (_("Quick Format is enabled. Do not use --quick for an outer volume intended to contain a hidden volume. It skips writing random data to unused volume space, reducing plausible deniability. For file containers, actual disk savings depend on host filesystem sparse-file support, and later writes can fail if host space runs out."));
|
||||
}
|
||||
else if (!AskYesNo (LangString["WARN_QUICK_FORMAT"], false, true))
|
||||
{
|
||||
throw UserAbort (SRC_POS);
|
||||
}
|
||||
}
|
||||
|
||||
// Password
|
||||
if (!options->Password && !Preferences.NonInteractive)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user