mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-18 02:05:13 +00:00
Check bucket at public bucket and add nocopyapi option automatically
This commit is contained in:
parent
7115835834
commit
d2ae14d8b7
16
src/s3fs.cpp
16
src/s3fs.cpp
@ -3419,19 +3419,6 @@ static void* s3fs_init(struct fuse_conn_info* conn)
|
||||
}
|
||||
|
||||
// Check Bucket
|
||||
//TEST
|
||||
/*****************
|
||||
// If the network is up, check for valid credentials and if the bucket
|
||||
// exists. skip check if mounting a public bucket
|
||||
if(!S3fsCurl::IsPublicBucket()){
|
||||
int result;
|
||||
if(EXIT_SUCCESS != (result = s3fs_check_service())){
|
||||
s3fs_exit_fuseloop(result);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
***************/
|
||||
|
||||
{
|
||||
int result;
|
||||
if(EXIT_SUCCESS != (result = s3fs_check_service())){
|
||||
@ -3439,7 +3426,6 @@ static void* s3fs_init(struct fuse_conn_info* conn)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
//TEST
|
||||
|
||||
// Investigate system capabilities
|
||||
#ifndef __APPLE__
|
||||
@ -4581,13 +4567,11 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
||||
off_t pubbucket = s3fs_strtoofft(strchr(arg, '=') + sizeof(char));
|
||||
if(1 == pubbucket){
|
||||
S3fsCurl::SetPublicBucket(true);
|
||||
//TEST
|
||||
// [NOTE]
|
||||
// if bucket is public(without credential), s3 do not allow copy api.
|
||||
// so s3fs sets nocopyapi mode.
|
||||
//
|
||||
nocopyapi = true;
|
||||
//TEST
|
||||
}else if(0 == pubbucket){
|
||||
S3fsCurl::SetPublicBucket(false);
|
||||
}else{
|
||||
|
Loading…
Reference in New Issue
Block a user