diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-28 22:47:11 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-28 22:55:40 -0400 |
commit | f4bf444ae0933f80b4ec1849ea1c44da43008499 (patch) | |
tree | c592dfe3cc68ef8c755c622dc33b42e3cdc256cd /Locations.hs | |
parent | da9cd315beb03570b96f83063a39e799fe01b166 (diff) |
store content in hashDirLower directories in bare repositories
When storing content in bare repositories, use the hashDirLower
directories. Bare repositories can be on USB drives, which might
use the FAT filesystem, and fall afoul of recent bugs in linux's handling
of mixed case on FAT. Using hashDirLower avoids that.
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Locations.hs b/Locations.hs index 425e4fdcf..fb5ee517e 100644 --- a/Locations.hs +++ b/Locations.hs @@ -75,7 +75,10 @@ annexLocations key = [using hashDirMixed, using hashDirLower] gitAnnexLocation :: Key -> Git.Repo -> IO FilePath gitAnnexLocation key r | Git.repoIsLocalBare r = - go (Git.workTree r) $ annexLocations key + -- bare repositories default to hashDirLower for new + -- content, as it's more portable, so check locations + -- in reverse order + go (Git.workTree r) $ reverse $ annexLocations key | otherwise = go (Git.workTree r </> ".git") $ annexLocations key where |