Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f2180e

Browse files
Revert "NC | don't stat directories in list_object"
This reverts commit 2edaf37. Signed-off-by: jackyalbo <jacky.albo@gmail.com>
1 parent a7dccec commit 3f2180e

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

‎src/sdk/namespace_fs.js‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -737,18 +737,16 @@ class NamespaceFS {
737737
if (!delimiter && r.common_prefix) {
738738
await process_dir(r.key);
739739
} else {
740-
if (!r.common_prefix) {
741-
const entry_path = path.join(this.bucket_path, r.key);
742-
// If entry is outside of bucket, returns stat of symbolic link
743-
const use_lstat = !(await this._is_path_in_bucket_boundaries(fs_context, entry_path));
744-
const stat = await native_fs_utils.stat_if_exists(fs_context, entry_path,
745-
use_lstat, config.NSFS_LIST_IGNORE_ENTRY_ON_EACCES);
746-
// TODO - GAP of .folder files - we return stat of the directory for the
747-
// xattr, but the creation time should be of the .folder files (and maybe more )
748-
if (stat) r.stat = stat;
749-
}
750-
// add the result only if we have the stat information or a directory
751-
if (r.stat || r.common_prefix) {
740+
const entry_path = path.join(this.bucket_path, r.key);
741+
// If entry is outside of bucket, returns stat of symbolic link
742+
const use_lstat = !(await this._is_path_in_bucket_boundaries(fs_context, entry_path));
743+
const stat = await native_fs_utils.stat_if_exists(fs_context, entry_path,
744+
use_lstat, config.NSFS_LIST_IGNORE_ENTRY_ON_EACCES);
745+
// TODO - GAP of .folder files - we return stat of the directory for the
746+
// xattr, but the creation time should be of the .folder files (and maybe more )
747+
if (stat) {
748+
r.stat = stat;
749+
// add the result only if we have the stat information
752750
if (pos < results.length) {
753751
results.splice(pos, 0, r);
754752
} else {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /