Skip to content

NSFS | versioning | don't show .versions folder on list-object-versions #8273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sdk/namespace_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,8 @@ class NamespaceFS {
if ((!ent.name.startsWith(prefix_ent) ||
ent.name < marker_curr ||
ent.name === this.get_bucket_tmpdir_name() ||
ent.name === config.NSFS_FOLDER_OBJECT_NAME) &&
!this._is_hidden_version_path(ent.name)) {
ent.name === config.NSFS_FOLDER_OBJECT_NAME) ||
this._is_hidden_version_path(ent.name)) {
return;
}
const isDir = await is_directory_or_symlink_to_directory(ent, fs_context, path.join(dir_path, ent.name));
Expand Down
7 changes: 7 additions & 0 deletions src/test/unit_tests/test_bucketspace_versioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -3053,6 +3053,13 @@ mocha.describe('List-objects', function() {
}
});
});

mocha.it('list object versions - should not list .versions folder', async function() {
const res = await s3_client.listObjectVersions({Bucket: bucket_name, Delimiter: "/"});
res.CommonPrefixes?.forEach(obj => {
assert.notEqual(obj.Prefix, ".versions/");
});
});
});

async function create_object(object_path, data, version_id, return_fd) {
Expand Down