aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-04-27 21:24:36 +0200
committereldritch horrors <pennae@lix.systems>2024-05-09 23:18:05 +0200
commit2f4a1dd6e03f3005e1f11dc98dda2d2d214b1f6f (patch)
treea9c0d70d2c4fa611d4c405ec81ac2b8f9c9bf3cf /src/libstore/local-store.cc
parentc77bd88259dac6e6b7bcb29425905467aa2ef66f (diff)
libstore: de-callback-ify Store::queryPathInfoUncached
Change-Id: I23a156aaff5328f67ca16ccd85c0ea1711b21e35
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 2f59b3591..ee401d7fc 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -880,16 +880,12 @@ uint64_t LocalStore::addValidPath(State & state,
}
-void LocalStore::queryPathInfoUncached(const StorePath & path,
- Callback<std::shared_ptr<const ValidPathInfo>> callback) noexcept
+std::shared_ptr<const ValidPathInfo> LocalStore::queryPathInfoUncached(const StorePath & path)
{
- try {
- callback(retrySQLite<std::shared_ptr<const ValidPathInfo>>([&]() {
- auto state(_state.lock());
- return queryPathInfoInternal(*state, path);
- }));
-
- } catch (...) { callback.rethrow(); }
+ return retrySQLite<std::shared_ptr<const ValidPathInfo>>([&]() {
+ auto state(_state.lock());
+ return queryPathInfoInternal(*state, path);
+ });
}