aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-01-31 14:58:50 +0100
committerGitHub <[email protected]>2024-01-31 14:58:50 +0100
commit6d880dd7391d39fe18148a0d14186ef7594ce053 (patch)
tree62f34d7e1cd554d2abf5ae56251364d9ba1d5272
parentActually thow exception if we can't parse the jobid when starting async job (... (diff)
downloadzen-6d880dd7391d39fe18148a0d14186ef7594ce053.tar.xz
zen-6d880dd7391d39fe18148a0d14186ef7594ce053.zip
only try to traverse an objectstore bucket if it really exists (#646)
* Only try to traverse a objectstore bucket if it really exists
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zenserver/objectstore/objectstore.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 776c33b77..d11bc404f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
- Improvement: Clean up HttpClient::Response::ErrorMessage to remove redundant ": "
- Bugfix: Make sure we clear read callback when doing Put in HttpClient to avoid timeout due to not sending data when reusing sessions
- Bugfix: Respect `--ignore-missing-attachments` in `oplog-export` command when loose file is missing on disk
+- Bugfix: Only try to traverse an objectstore bucket if it really exists
- Bugfix: Actually throw exception if we can't parse the JobId when starting async job
## 5.4.0
diff --git a/src/zenserver/objectstore/objectstore.cpp b/src/zenserver/objectstore/objectstore.cpp
index efec864e2..48fee0b68 100644
--- a/src/zenserver/objectstore/objectstore.cpp
+++ b/src/zenserver/objectstore/objectstore.cpp
@@ -406,6 +406,7 @@ HttpObjectStoreService::ListBucket(zen::HttpRouterRequest& Request, const std::s
Visitor FileVisitor(BucketName, BucketRoot, RelativeBucketPath);
FileSystemTraversal Traversal;
+ if (std::filesystem::exists(FullPath))
{
std::lock_guard _(BucketsMutex);
Traversal.TraverseFileSystem(FullPath, FileVisitor);