mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
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:
@@ -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 ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user