Linux: Overwriting file container allows you to use its space (#1147)
When replacing a file container, we increase the `diskSpace` by the file container's size. This doesn't affect the hidden volume space logic, as in that case we use `MaxVolumeSize` when `MaxVolumeSizeValid` is true instead of `AvailableDiskSpace`.
This commit is contained in:
parent
aa49278673
commit
232d3290b0
|
@ -39,6 +39,12 @@ namespace VeraCrypt
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!volumePath.IsDevice())
|
||||
{
|
||||
wxULongLong containerSizeUnsigned = wxFileName (wstring (volumePath)).GetSize();
|
||||
if (containerSizeUnsigned != wxInvalidSize)
|
||||
diskSpace += static_cast<wxLongLong_t>(containerSizeUnsigned.GetValue());
|
||||
}
|
||||
AvailableDiskSpace = (uint64) diskSpace.GetValue ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue