diff options
-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 |