summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-22 14:27:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-22 14:27:50 -0400
commitd3f0106f2ed15a4e4abbc09cc3e985a27dfee662 (patch)
tree2d5867dd13895eabc4def6412d791f543f3e2710 /Backend
parent78a325b09315efd593e6b729de18f15871a0d643 (diff)
move LocationLog into Annex monad from IO
It will need to run in Annex so it can use Branch
Diffstat (limited to 'Backend')
-rw-r--r--Backend/File.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index 386af0266..20cb3e95a 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -14,7 +14,6 @@
module Backend.File (backend, checkKey) where
-import Control.Monad.State (liftIO)
import Data.List
import Data.String.Utils
@@ -132,7 +131,7 @@ showLocations :: Key -> [UUID] -> Annex ()
showLocations key exclude = do
g <- Annex.gitRepo
u <- getUUID g
- uuids <- liftIO $ keyLocations g key
+ uuids <- keyLocations g key
untrusteduuids <- trustGet UnTrusted
let uuidswanted = filteruuids uuids (u:exclude++untrusteduuids)
let uuidsskipped = filteruuids uuids (u:exclude++uuidswanted)
@@ -190,7 +189,7 @@ checkKeyNumCopies :: Key -> Maybe FilePath -> Maybe Int -> Annex Bool
checkKeyNumCopies key file numcopies = do
needed <- getNumCopies numcopies
g <- Annex.gitRepo
- locations <- liftIO $ keyLocations g key
+ locations <- keyLocations g key
untrusted <- trustGet UnTrusted
let untrustedlocations = intersect untrusted locations
let safelocations = filter (`notElem` untrusted) locations