Merge pull request #4038 from BOINC/Rytiss-fuh_disk

Make file_upload_handler stop early when low disk space
This commit is contained in:
David Anderson 2020-09-30 22:49:39 -07:00 committed by GitHub
commit 11af93eaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,8 @@ using std::string;
#define ERR_TRANSIENT true
#define ERR_PERMANENT false
#define FUH_MIN_FREE_SPACE 1e9
char this_filename[256];
string variety = "";
double start_time();
@ -462,7 +464,7 @@ bool volume_full(char* path) {
double total, avail;
int retval = get_filesystem_info(total, avail, path);
if (retval) return false;
if (avail<1e6) {
if (avail < FUH_MIN_FREE_SPACE) {
return true;
}
return false;