summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/DropUnused.hs2
-rw-r--r--Command/Init.hs3
-rw-r--r--Command/Migrate.hs2
-rw-r--r--Command/SendKey.hs2
-rw-r--r--Command/Unlock.hs2
-rw-r--r--Command/Unused.hs2
6 files changed, 7 insertions, 6 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index cfd6fc3d0..9427f8103 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -40,7 +40,7 @@ start s = do
readUnusedLog :: Annex (M.Map String Key)
readUnusedLog = do
g <- Annex.gitRepo
- let f = annexUnusedLog g
+ let f = gitAnnexUnusedLog g
e <- liftIO $ doesFileExist f
if e
then do
diff --git a/Command/Init.hs b/Command/Init.hs
index 47ac8e4c0..e780c8863 100644
--- a/Command/Init.hs
+++ b/Command/Init.hs
@@ -10,6 +10,7 @@ module Command.Init where
import Control.Monad.State (liftIO)
import Control.Monad (when)
import System.Directory
+import System.FilePath
import Command
import qualified Annex
@@ -75,7 +76,7 @@ gitAttributesWrite repo = do
attributes]
attrLine :: String
-attrLine = stateLoc ++ "*.log merge=union"
+attrLine = stateDir </> "*.log merge=union"
{- set up a git pre-commit hook, if one is not already present -}
gitPreCommitHookWrite :: Git.Repo -> Annex ()
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index 566b508c0..c0e80c5b4 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -50,7 +50,7 @@ perform file oldkey newbackend = do
-- (the file can't be stored as usual, because it's already a symlink).
-- The old backend's key is not dropped from it, because there may
-- be other files still pointing at that key.
- let src = annexLocation g oldkey
+ let src = gitAnnexLocation g oldkey
stored <- Backend.storeFileKey src $ Just newbackend
case stored of
Nothing -> return Nothing
diff --git a/Command/SendKey.hs b/Command/SendKey.hs
index aaa0b4836..cb883b53a 100644
--- a/Command/SendKey.hs
+++ b/Command/SendKey.hs
@@ -32,7 +32,7 @@ start keyname = do
let key = genKey (head backends) keyname
present <- inAnnex key
g <- Annex.gitRepo
- let file = annexLocation g key
+ let file = gitAnnexLocation g key
when present $
liftIO $ rsyncServerSend file
liftIO exitFailure
diff --git a/Command/Unlock.hs b/Command/Unlock.hs
index 645fac8a2..bd1021cc3 100644
--- a/Command/Unlock.hs
+++ b/Command/Unlock.hs
@@ -43,7 +43,7 @@ perform dest key = do
error "content not present"
g <- Annex.gitRepo
- let src = annexLocation g key
+ let src = gitAnnexLocation g key
liftIO $ removeFile dest
showNote "copying..."
ok <- liftIO $ copyFile src dest
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 9fdf4cda6..5e5698e38 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -43,7 +43,7 @@ checkUnused = do
unused <- unusedKeys
let list = number 1 unused
g <- Annex.gitRepo
- liftIO $ writeFile (annexUnusedLog g) $ unlines $
+ liftIO $ writeFile (gitAnnexUnusedLog g) $ unlines $
map (\(n, k) -> show n ++ " " ++ show k) list
if null unused
then return True