File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 298
298
peel Current = Nothing
299
299
peel Root = Nothing
300
300
peel p@(ParentIn _) = case canonicalize' p of
301
- Tuple true p -> peel p
301
+ Tuple true p' -> peel p'
302
302
_ -> Nothing
303
303
peel (DirIn p d) = Just $ Tuple (unsafeCoerceType p) (Left d)
304
304
peel (FileIn p f) = Just $ Tuple (unsafeCoerceType p) (Right f)
@@ -445,11 +445,11 @@ relativeTo p1 p2 = relativeTo' (canonicalize p1) (canonicalize p2)
445
445
relativeTo' :: forall b' . Path a b' s -> Path a Dir s' -> Maybe (Path Rel b' s' )
446
446
relativeTo' Root Root = Just Current
447
447
relativeTo' Current Current = Just Current
448
- relativeTo' p1 p2
449
- | identicalPath p1 p2 = Just Current
450
- | otherwise = case peel p1 of
451
- Just (Tuple p1 ' e) ->
452
- flip (</>) (either (DirIn Current ) (FileIn Current ) e) <$> relativeTo' p1' p2
448
+ relativeTo' cp1 cp2
449
+ | identicalPath cp1 cp2 = Just Current
450
+ | otherwise = case peel cp1 of
451
+ Just (Tuple cp1 ' e) ->
452
+ flip (</>) (either (DirIn Current ) (FileIn Current ) e) <$> relativeTo' cp1' cp2
453
453
Nothing -> Nothing
454
454
455
455
-- | Attempts to sandbox a path relative to some directory. If successful, the sandboxed
You can’t perform that action at this time.
0 commit comments