Merge branch 'fix-file-downloading' into 'next'

Fix bug where SRB2 would check size of disk from current directory instead of srb2home

See merge request STJr/SRB2!1121
This commit is contained in:
James R 2020-08-19 18:16:22 -04:00
commit 38d094d3f6
1 changed files with 2 additions and 2 deletions

View File

@ -2602,7 +2602,7 @@ void I_GetDiskFreeSpace(INT64 *freespace)
return;
#else // Both Linux and BSD have this, apparently.
struct statfs stfs;
if (statfs(".", &stfs) == -1)
if (statfs(srb2home, &stfs) == -1)
{
*freespace = INT32_MAX;
return;
@ -2621,7 +2621,7 @@ void I_GetDiskFreeSpace(INT64 *freespace)
}
if (pfnGetDiskFreeSpaceEx)
{
if (pfnGetDiskFreeSpaceEx(NULL, &lfreespace, &usedbytes, NULL))
if (pfnGetDiskFreeSpaceEx(srb2home, &lfreespace, &usedbytes, NULL))
*freespace = lfreespace.QuadPart;
else
*freespace = INT32_MAX;