From 0a9c061feaf1b0c622b3af35731cf4110db7fd9a Mon Sep 17 00:00:00 2001 From: GoldenTails Date: Tue, 18 Aug 2020 17:34:32 -0500 Subject: [PATCH] Fix bug where SRB2 would check size of current directory instead of srb2home Hopefully that fixes that one bug with weird filesize issues too --- src/sdl/i_system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index b24ae2814..8ad2826b7 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2601,7 +2601,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; @@ -2620,7 +2620,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;