Skip to content

Commit d29f1b7

Browse files
committed
Revert changes from testing locally.
This wasn't meant to make it into previous commits.
1 parent 8f26601 commit d29f1b7

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

tiledb/sm/filesystem/posix.cc

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -389,23 +389,8 @@ std::vector<directory_entry> Posix::ls_with_sizes(
389389

390390
Status Posix::ls(
391391
const std::string& path, std::vector<std::string>* paths) const {
392-
struct dirent* next_path = nullptr;
393-
auto dir = PosixDIR::open(path);
394-
if (dir.empty()) {
395-
return {};
396-
}
397-
398-
while ((next_path = readdir(dir.get())) != nullptr) {
399-
if (!strcmp(next_path->d_name, ".") || !strcmp(next_path->d_name, "..")) {
400-
continue;
401-
}
402-
std::string abspath = path + "/" + next_path->d_name;
403-
404-
if (next_path->d_type == DT_DIR) {
405-
paths->emplace_back(abspath);
406-
} else {
407-
paths->emplace_back(abspath);
408-
}
392+
for (auto& fs : ls_with_sizes(URI(path), false)) {
393+
paths->emplace_back(fs.path().native());
409394
}
410395

411396
return Status::Ok();

0 commit comments

Comments
 (0)