Skip to content

Commit 08c4533

Browse files
Fix local archive resolution
- wouldn't have worked with absolute paths in snapshots
1 parent 61cff5e commit 08c4533

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Stack/Snapshot.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ loadResolver (ResolverCustom url loc) = do
282282
}
283283
resolveLocalArchive pl = pl
284284
resolveLocalFilePath path =
285-
if not $ isURI path && FilePath.isRelative path
286-
then FilePath.dropFileName fp FilePath.</> FilePath.normalise path
287-
else path
285+
if isURI path || FilePath.isAbsolute path
286+
then path
287+
else FilePath.dropFileName fp FilePath.</> FilePath.normalise path
288288

289289
WithJSONWarnings (sd0, mparentResolver, mcompiler) warnings <-
290290
liftIO (decodeFileEither fp) >>= either

0 commit comments

Comments
 (0)