mirror of https://github.com/BOINC/boinc.git
Make file_upload_handler stop early when low disk space
This commit is contained in:
parent
24548b00cc
commit
a75d29e55b
|
@ -59,6 +59,8 @@ using std::string;
|
||||||
#define ERR_TRANSIENT true
|
#define ERR_TRANSIENT true
|
||||||
#define ERR_PERMANENT false
|
#define ERR_PERMANENT false
|
||||||
|
|
||||||
|
#define FUH_MIN_FREE_SPACE 1e9
|
||||||
|
|
||||||
char this_filename[256];
|
char this_filename[256];
|
||||||
string variety = "";
|
string variety = "";
|
||||||
double start_time();
|
double start_time();
|
||||||
|
@ -462,7 +464,7 @@ bool volume_full(char* path) {
|
||||||
double total, avail;
|
double total, avail;
|
||||||
int retval = get_filesystem_info(total, avail, path);
|
int retval = get_filesystem_info(total, avail, path);
|
||||||
if (retval) return false;
|
if (retval) return false;
|
||||||
if (avail<1e6) {
|
if (avail < FUH_MIN_FREE_SPACE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue