Skip to content

Commit 9187360

Browse files
authored
Merge pull request #25 from 815331793/revert-23-master
Revert "optimize the mount bucket process"
2 parents fc919d1 + 494967d commit 9187360

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
dnl Process this file with autoconf to produce a configure script.
1919

2020
AC_PREREQ(2.59)
21-
AC_INIT(cosfs, 1.0.10)
21+
AC_INIT(cosfs, 1.0.9)
2222
AC_CONFIG_HEADER([config.h])
2323

2424
AC_CANONICAL_SYSTEM

src/curl.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,25 +2570,17 @@ int S3fsCurl::CheckBucket(void)
25702570
}
25712571
string resource;
25722572
string turl;
2573-
MakeUrlResource(get_realpath("/").c_str(), resource, turl);
2573+
MakeUrlResource("/", resource, turl);
25742574

25752575
url = prepare_url(turl.c_str());
2576-
path = get_realpath("/");
2576+
path = "/";
25772577
requestHeaders = NULL;
25782578
responseHeaders.clear();
25792579
bodydata = new BodyData();
25802580

25812581
string date = get_date_rfc850();
25822582
requestHeaders = curl_slist_sort_insert(requestHeaders, "Date", date.c_str());
25832583

2584-
//limit the number of objects returned if it is a GET Bucket request
2585-
if(mount_prefix.empty()){
2586-
url += "?";
2587-
url += "delimiter=/";
2588-
url += "&max-keys=2";
2589-
url += "&prefix=/";
2590-
}
2591-
25922584
if(!S3fsCurl::IsPublicBucket()){
25932585
string Signature = CalcSignature("GET", "", "", date, resource);
25942586
requestHeaders = curl_slist_sort_insert(requestHeaders, "Authorization", Signature.c_str());

src/s3fs.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3391,6 +3391,14 @@ static int s3fs_removexattr(const char* path, const char* name)
33913391

33923392
static void* s3fs_init(struct fuse_conn_info* conn)
33933393
{
3394+
// check bucket
3395+
{
3396+
int result;
3397+
if (EXIT_SUCCESS != (result = s3fs_check_service())) {
3398+
s3fs_exit_fuseloop(result);
3399+
return NULL;
3400+
}
3401+
}
33943402
// Investigate system capabilities
33953403
#ifndef __APPLE__
33963404
if((unsigned int)conn->capable & FUSE_CAP_ATOMIC_O_TRUNC){

0 commit comments

Comments
 (0)