diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -159,7 +159,9 @@ if(gotframe ==1) // Downloads the job tar if it isn't present. @TODO: Delete old job data struct stat buffer; int fstatus = stat(pathtoJobfile, &buffer); - if(fstatus != -1){ + + // If stat'ing the jobfile shows that the jobfile doesn't exist, we'll download it. + if(fstatus == -1){ // Downloads the Tar @TODO: add progress bar if( curlget(urltoTar, pathtoTar) == 0){ fprintf(stderr, "File downloaded without errors\n");