From: Joey Hess Date: Thu, 26 Nov 2020 15:48:52 +0000 (-0400) Subject: fix test failure on windows X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~102^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e92117bfd0d28b24f51a10903158b95010defffd;p=git-annex.git fix test failure on windows "a:" failed; this test wants a relative filename so isDrive avoids it Note that on linux, isDrive "/foo" is true. This test also filters out absolute paths already, so that is ok. This commit was sponsored by Brock Spratlen on Patreon. --- diff --git a/Annex/View/ViewedFile.hs b/Annex/View/ViewedFile.hs index fccf9b48ec..a775da7dad 100644 --- a/Annex/View/ViewedFile.hs +++ b/Annex/View/ViewedFile.hs @@ -83,7 +83,7 @@ prop_viewedFile_roundtrips :: TestableFilePath -> Bool prop_viewedFile_roundtrips tf -- Relative filenames wanted, not directories. | any (isPathSeparator) (end f ++ beginning f) = True - | isAbsolute f = True + | isAbsolute f || isDrive f = True | otherwise = dir == dirFromViewedFile (viewedFileFromReference f) where f = fromTestableFilePath tf