diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-09-20 10:06:04 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-09-21 10:39:09 +0200 |
commit | 081287fc0a9494ac45c6ca5efdf164c77f835117 (patch) | |
tree | 50fbb28ba5399c1ad2d1781eaeab5fb2fbaa93c5 /src | |
parent | 2455c03e0d368914254b47a69a6ff607bfdac164 (diff) | |
download | VeraCrypt-081287fc0a9494ac45c6ca5efdf164c77f835117.tar.gz VeraCrypt-081287fc0a9494ac45c6ca5efdf164c77f835117.zip |
Windows: add /nosizecheck switch to VeraCrypt Format that allows disabling check on file container size against available free space on target disk. This enables to workaround a bug in Microsoft Distributed File System (DFS) that report wrong free disk space (https://support.microsoft.com/en-us/help/177127/incorrect-disk-free-space-information-for-a-dfs-client-share)
Diffstat (limited to 'src')
-rw-r--r-- | src/Format/Tcformat.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 46ad2083..4274e377 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -178,6 +178,7 @@ int SysEncDetectHiddenSectors = -1; /* Whether the user wants us to detect and int SysEncDriveAnalysisStart; BOOL bDontVerifyRescueDisk = FALSE; BOOL bFirstSysEncResumeDone = FALSE; +BOOL bDontCheckFileContainerSize = FALSE; /* If true, we don't check if the given size of file container is smaller than the available size on the hosting disk */ int nMultiBoot = 0; /* The number of operating systems installed on the computer, according to the user. 0: undetermined, 1: one, 2: two or more */ volatile BOOL bHiddenVol = FALSE; /* If true, we are (or will be) creating a hidden volume. */ volatile BOOL bHiddenVolHost = FALSE; /* If true, we are (or will be) creating the host volume (called "outer") for a hidden volume. */ @@ -1541,7 +1542,7 @@ static void VerifySizeAndUpdate (HWND hwndDlg, BOOL bUpdate) { if (lTmp * i > (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE)) bEnable = FALSE; - else if (!bDevice && (lTmp * i > nAvailableFreeSpace) && (!bIsSparseFilesSupportedByHost || bHiddenVolHost)) + else if (!bDevice && (lTmp * i > nAvailableFreeSpace) && !bDontCheckFileContainerSize && (!bIsSparseFilesSupportedByHost || bHiddenVolHost)) { // we check container size against available free space only when creating dynamic volume is not possible // which is the case if filesystem doesn't allow sparce file or if we are creating outer volume of a hidden volume @@ -8945,6 +8946,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionSilent, OptionDynamic, OptionForce, + OptionNoSizeCheck, }; argument args[]= @@ -8965,6 +8967,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionSilent, L"/silent", NULL, FALSE }, { OptionDynamic, L"/dynamic", NULL, FALSE }, { OptionForce, L"/force", NULL, FALSE }, + { OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE }, // Internal { CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE }, @@ -9313,6 +9316,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) bDontVerifyRescueDisk = TRUE; break; + case OptionNoSizeCheck: + bDontCheckFileContainerSize = TRUE; + break; + case OptionHistory: { wchar_t szTmp[8] = {0}; |