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
+12 -2
View File
@@ -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)
{