mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-02-08 05:28:26 +00:00
Resolves issue #156
s3fs_readdir() now looks at stat_cache git-svn-id: http://s3fs.googlecode.com/svn/trunk@312 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
c8d5b35f8f
commit
2c0456680e
@ -1,7 +1,7 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(s3fs, 1.38)
|
AC_INIT(s3fs, 1.39)
|
||||||
|
|
||||||
|
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
14
src/s3fs.cpp
14
src/s3fs.cpp
@ -3276,7 +3276,19 @@ static int s3fs_readdir(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Key.size() > 0) {
|
bool in_stat_cache = false;
|
||||||
|
pthread_mutex_lock(&stat_cache_lock);
|
||||||
|
stat_cache_t::iterator iter = stat_cache.find("/" + Key);
|
||||||
|
if(iter != stat_cache.end()) {
|
||||||
|
// in stat cache, skip http request
|
||||||
|
if(filler(buf, mybasename(Key).c_str(), 0, 0))
|
||||||
|
break;
|
||||||
|
|
||||||
|
in_stat_cache = true;
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&stat_cache_lock);
|
||||||
|
|
||||||
|
if (Key.size() > 0 && !in_stat_cache) {
|
||||||
if (filler(buf, mybasename(Key).c_str(), 0, 0)) {
|
if (filler(buf, mybasename(Key).c_str(), 0, 0)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user