Skip to content

Commit

Permalink
Check bucket at public bucket and add nocopyapi option automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
ggtakec committed May 13, 2017
1 parent 7115835 commit d2ae14d
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/s3fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3419,27 +3419,13 @@ 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())){
s3fs_exit_fuseloop(result);
return NULL;
}
}
//TEST

// Investigate system capabilities
#ifndef __APPLE__
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit d2ae14d

Please sign in to comment.