From bed06d13347d1ee87f3c1d82d33a6502f0f98303 Mon Sep 17 00:00:00 2001 From: Arjun Kathuria Date: Tue, 29 Jun 2021 08:56:57 +0530 Subject: [PATCH] make reported leftover file paths absolute --- lib/GHCup.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/GHCup.hs b/lib/GHCup.hs index a867a17..0a380fc 100644 --- a/lib/GHCup.hs +++ b/lib/GHCup.hs @@ -1437,11 +1437,15 @@ rmGhcupDirs = do reportRemainingFiles ghcupDir = do remainingFiles <- liftIO $ getDirectoryContentsRecursive ghcupDir - pure remainingFiles + remainingFilesAbsolute <- makePathsAbsolute remainingFiles + pure remainingFilesAbsolute + + makePathsAbsolute paths = liftIO $ traverse makeAbsolute paths -- we expect only files inside cache/log dir -- we report remaining files/dirs later, -- hence the force/quiet mode in these delete functions below. + deleteFile filepath = do hideError InappropriateType $ rmFile filepath