summaryrefslogtreecommitdiff
path: root/Remote/Directory.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-28 23:20:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-28 23:20:31 -0400
commitbff6ca2634e5f796d83c1632a66ac00adab0be43 (patch)
tree64ad9d1001357266e2e6a8b516703f0c603f2582 /Remote/Directory.hs
parente6ef66cea39b8c97a1e5115251e5ed0163c66fb3 (diff)
refactor
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r--Remote/Directory.hs14
1 files changed, 2 insertions, 12 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs
index 891a19ef6..83302b65a 100644
--- a/Remote/Directory.hs
+++ b/Remote/Directory.hs
@@ -62,20 +62,10 @@ directorySetup u c = do
gitConfigSpecialRemote u c' "directory" dir
return $ M.delete "directory" c'
-{- Where to store a given Key in the Directory.
- -
- - There are two possible locations to try; this had to be done because
- - on Linux, vfat filesystem mounted with shortname=mixed have a
- - variant of case insensativity that causes miserable failure when
- - hashDirMixed produces eg, "xx" and "XX". The first directory to be
- - created wins the namespace, and the second one cannot then be created.
- - But unlike behavior with shortname=lower, "XX/foo" won't look in
- - "xx/foo".
- -}
+{- Locations to try to access a given Key in the Directory. -}
locations :: FilePath -> Key -> [FilePath]
-locations d k = [using hashDirMixed, using hashDirLower]
+locations d k = map (\h -> d </> h k </> f </> f) annexHashes
where
- using h = d </> h k </> f </> f
f = keyFile k
withCheckedFile :: (FilePath -> IO Bool) -> FilePath -> Key -> (FilePath -> IO Bool) -> IO Bool