UD2WKDUVY2MLHT3TFSJ45OWD4RGT6JGVIUJOMM3KVM4V7WSZAYYQC
# FIXME: doing a glob is very inefficient. Should do a database
# lookup.
my @glob = glob("/nix/store/$hash*");
foreach my $storePath (@glob) {
if (isValidPath($storePath)) {
print STDERR "FOUND: $hash -> $storePath\n";
return $storePath;
}
#return $storePath if isValidPath($storePath);
}
notFound($c, "Store path with hash ‘$hash’ does not exist.");
my $path = queryPathFromHashPart($hash);
notFound($c, "Store path with hash ‘$hash’ does not exist.") unless $path;
return $path;