about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-24T12·53+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-24T12·53+0200
commita9d4f2b303584c9de26140a511302ac2fdc7c9ad (patch)
tree441692c2550a3df714818192b732a14bdec285f8 /src/libstore/local-store.cc
parentd74236d1f2c3bca4fcc8cb1574fb962e813f69d3 (diff)
Fix queryPathFromHashPart()
The inner lambda was returning a SQLite-internal char * rather than a
std::string, leading to Hydra errors liks

  Caught exception in Hydra::Controller::Root->narinfo "path ‘ø˜£â€™ is not in the Nix store at /nix/store/6mvvyb8fgwj23miyal5mdr8ik4ixk15w-hydra-0.1.1234.abcdef/libexec/hydra/lib/Hydra/Controller/Root.pm line 352."
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index d3f0c4787e..10056f2f1f 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -760,7 +760,7 @@ Path LocalStore::queryPathFromHashPart(const string & hashPart)
 
     Path prefix = storeDir + "/" + hashPart;
 
-    return retrySQLite<Path>([&]() {
+    return retrySQLite<Path>([&]() -> std::string {
         auto state(_state.lock());
 
         auto useQueryPathFromHashPart(state->stmtQueryPathFromHashPart.use()(prefix));