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
|
// 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;
|
int result;
|
||||||
if(EXIT_SUCCESS != (result = s3fs_check_service())){
|
if(EXIT_SUCCESS != (result = s3fs_check_service())){
|
||||||
@ -3439,7 +3426,6 @@ static void* s3fs_init(struct fuse_conn_info* conn)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TEST
|
|
||||||
|
|
||||||
// Investigate system capabilities
|
// Investigate system capabilities
|
||||||
#ifndef __APPLE__
|
#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));
|
off_t pubbucket = s3fs_strtoofft(strchr(arg, '=') + sizeof(char));
|
||||||
if(1 == pubbucket){
|
if(1 == pubbucket){
|
||||||
S3fsCurl::SetPublicBucket(true);
|
S3fsCurl::SetPublicBucket(true);
|
||||||
//TEST
|
|
||||||
// [NOTE]
|
// [NOTE]
|
||||||
// if bucket is public(without credential), s3 do not allow copy api.
|
// if bucket is public(without credential), s3 do not allow copy api.
|
||||||
// so s3fs sets nocopyapi mode.
|
// so s3fs sets nocopyapi mode.
|
||||||
//
|
//
|
||||||
nocopyapi = true;
|
nocopyapi = true;
|
||||||
//TEST
|
|
||||||
}else if(0 == pubbucket){
|
}else if(0 == pubbucket){
|
||||||
S3fsCurl::SetPublicBucket(false);
|
S3fsCurl::SetPublicBucket(false);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
Reference in New Issue
Block a user