We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bde7a8 commit 41af101Copy full SHA for 41af101
hnix-store-nar/src/System/Nix/Nar/Parser.hs
@@ -211,7 +211,9 @@ parseSymlink = do
211
currentDirectoryAndFile :: Monad m => NarParser m (FilePath, FilePath)
212
currentDirectoryAndFile = do
213
dirStack <- State.gets directoryStack
214
- pure (List.foldr1 (</>) (List.reverse $ drop 1 dirStack), head dirStack)
+ case dirStack of
215
+ (x:xs) -> pure (List.foldr1 (</>) (List.reverse xs), x)
216
+ _ -> error "currentDirectoryAndFile: empty dirStack"
217
218
-- | Internal data type representing symlinks encountered in the NAR
219
data LinkInfo = LinkInfo
0 commit comments