@@ -497,7 +497,7 @@ makeObjectFilePathFromC
497497 -> Path Abs File -- ^ The path to the .c file.
498498 -> m (Path Abs File ) -- ^ The path to the .o file for the component.
499499makeObjectFilePathFromC cabalDir namedComponent distDir cFilePath = do
500- relCFilePath <- stripDir cabalDir cFilePath
500+ relCFilePath <- stripProperPrefix cabalDir cFilePath
501501 relOFilePath <-
502502 parseRelFile (replaceExtension (toFilePath relCFilePath) " o" )
503503 addComponentPrefix <- fileGenDirFromComponentName namedComponent
@@ -991,7 +991,7 @@ getDependencies component dotCabalPath =
991991 readResolvedHi resolvedFile = do
992992 dumpHIDir <- getDumpHIDir
993993 dir <- asks (parent . fst )
994- case stripDir dir resolvedFile of
994+ case stripProperPrefix dir resolvedFile of
995995 Nothing -> return (S. empty, [] )
996996 Just fileRel -> do
997997 let dumpHIPath =
@@ -1243,7 +1243,7 @@ resolveOrWarn subject resolver path =
12431243 result <- resolver dir path
12441244 when (isNothing result) $
12451245 $ logWarn (" Warning: " <> subject <> " listed in " <>
1246- T. pack (maybe (FL. toFilePath file) FL. toFilePath (stripDir cwd file)) <>
1246+ T. pack (maybe (FL. toFilePath file) FL. toFilePath (stripProperPrefix cwd file)) <>
12471247 " file does not exist: " <>
12481248 T. pack path)
12491249 return result
0 commit comments