mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
toStorePath(): Return a StorePath and the suffix
This commit is contained in:
parent
143a5f32ed
commit
c0dd05131e
11 changed files with 60 additions and 61 deletions
|
@ -20,9 +20,9 @@ struct LocalStoreAccessor : public FSAccessor
|
|||
|
||||
Path toRealPath(const Path & path)
|
||||
{
|
||||
Path storePath = store->toStorePath(path);
|
||||
if (!store->isValidPath(store->parseStorePath(storePath)))
|
||||
throw InvalidPath("path '%1%' is not a valid store path", storePath);
|
||||
auto storePath = store->toStorePath(path).first;
|
||||
if (!store->isValidPath(storePath))
|
||||
throw InvalidPath("path '%1%' is not a valid store path", store->printStorePath(storePath));
|
||||
return store->getRealStoreDir() + std::string(path, store->storeDir.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue