Improved disk space check with min gb value from config

This commit is contained in:
N00MKRAD
2021-03-09 19:28:12 +01:00
parent c04823a888
commit c34047f54b

View File

@@ -49,9 +49,9 @@ namespace Flowframes
string drivePath = Interpolate.current.tempFolder.Substring(0, 2);
long mb = IOUtils.GetDiskSpace(Interpolate.current.tempFolder);
Logger.Log($"Disk space check for '{drivePath}/': {mb} MB free.", true);
Logger.Log($"Disk space check for '{drivePath}/': {(mb / 1024f).ToString("0.0")} GB free.", true);
if (mb < 4096)
if (mb < (Config.GetInt("minDiskSpaceGb", 6) * 1024))
{
Interpolate.Cancel("Running out of disk space!");
}