summaryrefslogtreecommitdiff
path: root/Types/FileMatcher.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2019-12-09 13:49:05 -0400
committerJoey Hess <joeyh@joeyh.name>2019-12-09 15:07:21 -0400
commitbdec7fed9cae4fe5c3cbdf0ee2ee6ae8530bbc19 (patch)
treeb8ca2b1bc16170c616a7c8404fae22c0b859c235 /Types/FileMatcher.hs
parenta7004375ec381b6b2f8ce114a5e24c764ef4fdfd (diff)
convert TopFilePath to use RawFilePath
Adds a dependency on filepath-bytestring, an as yet unreleased fork of filepath that operates on RawFilePath. Git.Repo also changed to use RawFilePath for the path to the repo. This does eliminate some RawFilePath -> FilePath -> RawFilePath conversions. And filepath-bytestring's </> is probably faster. But I don't expect a major performance improvement from this. This is mostly groundwork for making Annex.Location use RawFilePath, which will allow for a conversion-free pipleline.
Diffstat (limited to 'Types/FileMatcher.hs')
-rw-r--r--Types/FileMatcher.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Types/FileMatcher.hs b/Types/FileMatcher.hs
index d0e24ba37d..114f96774f 100644
--- a/Types/FileMatcher.hs
+++ b/Types/FileMatcher.hs
@@ -12,6 +12,7 @@ import Types.Key (Key, AssociatedFile)
import Types.Mime
import Utility.Matcher (Matcher, Token)
import Utility.FileSize
+import Utility.FileSystemEncoding
import Control.Monad.IO.Class
import qualified Data.Map as M
@@ -24,9 +25,9 @@ data MatchInfo
| MatchingInfo ProvidedInfo
data FileInfo = FileInfo
- { currFile :: FilePath
+ { currFile :: RawFilePath
-- ^ current path to the file, for operations that examine it
- , matchFile :: FilePath
+ , matchFile :: RawFilePath
-- ^ filepath to match on; may be relative to top of repo or cwd
}