better directory handling
Rename Locations functions for better consitency, and make their values more consistent too. Used </> rather than manually building paths. There are still more places that manually do so, but are tricky, due to the behavior of </> when the second FilePath is absolute. So I only changed places where it obviously was relative.
This commit is contained in:
parent
6be516ae3b
commit
167523f09d
16 changed files with 78 additions and 57 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue