forked from lix-project/lix
FSAccessor: Throw InvalidPath
This commit is contained in:
parent
f43823f676
commit
6cb4bdf152
|
@ -254,7 +254,7 @@ struct BinaryCacheStoreAccessor : public FSAccessor
|
|||
std::string restPath = std::string(path, storePath.size());
|
||||
|
||||
if (!store->isValidPath(storePath))
|
||||
throw Error(format("path ‘%1%’ is not a valid store path") % storePath);
|
||||
throw InvalidPath(format("path ‘%1%’ is not a valid store path") % storePath);
|
||||
|
||||
auto i = nars.find(storePath);
|
||||
if (i != nars.end()) return {i->second, restPath};
|
||||
|
|
|
@ -23,7 +23,7 @@ struct LocalStoreAccessor : public FSAccessor
|
|||
{
|
||||
Path storePath = store->toStorePath(path);
|
||||
if (!store->isValidPath(storePath))
|
||||
throw Error(format("path ‘%1%’ is not a valid store path") % storePath);
|
||||
throw InvalidPath(format("path ‘%1%’ is not a valid store path") % storePath);
|
||||
return store->getRealStoreDir() + std::string(path, store->storeDir.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue