diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-25 18:09:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-25 18:09:45 -0400 |
commit | ec8270cb586cc541b57abb2e3e7e8240b3fd6cc8 (patch) | |
tree | c8d0a1807e6696af3bd287dc23baa43a341220bc /Annex | |
parent | e18b3e57f42476063c24ccc3eb9d438d0da4653d (diff) |
fix test to work on Windows
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/View/ViewedFile.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Annex/View/ViewedFile.hs b/Annex/View/ViewedFile.hs index 5733d4c94..25ac16a34 100644 --- a/Annex/View/ViewedFile.hs +++ b/Annex/View/ViewedFile.hs @@ -68,8 +68,8 @@ dirFromViewedFile = joinPath . drop 1 . sep [] "" prop_viewedFile_roundtrips :: FilePath -> Bool prop_viewedFile_roundtrips f - | isAbsolute f = True -- Only relative paths are encoded. - | any (isPathSeparator) (end f) = True -- Filenames wanted, not directories. + -- Relative filenames wanted, not directories. + | any (isPathSeparator) (end f ++ beginning f) = True | otherwise = dir == dirFromViewedFile (viewedFileFromReference f) where dir = joinPath $ beginning $ splitDirectories f |