Merge pull request #1292 from gaul/retries

Do not allow zero retries
This commit is contained in:
Takeshi Nakatani 2020-05-24 15:03:03 +09:00 committed by GitHub
commit 56ed6bb97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4562,7 +4562,12 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
return 0;
}
if(0 == STR2NCMP(arg, "retries=")){
S3fsCurl::SetRetries(static_cast<int>(cvt_strtoofft(strchr(arg, '=') + sizeof(char))));
off_t retries = static_cast<int>(cvt_strtoofft(strchr(arg, '=') + sizeof(char)));
if(retries == 0){
S3FS_PRN_EXIT("retries must be greater than zero");
return -1;
}
S3fsCurl::SetRetries(retries);
return 0;
}
if(0 == STR2NCMP(arg, "use_cache=")){