finish fixing removeLink on windows
9cb250f7be
got the ones in RawFilePath,
but there were others that used the one from unix-compat, which fails at
runtime on windows. To avoid this,
import System.PosixCompat.Files hiding removeLink
This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
dce0781391
commit
a3b714ddd9
28 changed files with 73 additions and 64 deletions
8
Creds.hs
8
Creds.hs
|
@ -32,12 +32,13 @@ import Crypto
|
|||
import Types.ProposedAccepted
|
||||
import Remote.Helper.Encryptable (remoteCipher, remoteCipher', embedCreds, EncryptionIsSetup, extractCipher)
|
||||
import Utility.Env (getEnv)
|
||||
import Utility.Base64
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
import qualified Data.ByteString.Lazy.Char8 as L
|
||||
import qualified Data.ByteString.Char8 as S
|
||||
import qualified Data.Map as M
|
||||
import qualified System.FilePath.ByteString as P
|
||||
import Utility.Base64
|
||||
|
||||
{- A CredPair can be stored in a file, or in the environment, or
|
||||
- in a remote's configuration. -}
|
||||
|
@ -211,9 +212,8 @@ decodeCredPair creds = case lines creds of
|
|||
|
||||
removeCreds :: FilePath -> Annex ()
|
||||
removeCreds file = do
|
||||
d <- fromRawFilePath <$> fromRepo gitAnnexCredsDir
|
||||
let f = d </> file
|
||||
liftIO $ removeWhenExistsWith removeLink f
|
||||
d <- fromRepo gitAnnexCredsDir
|
||||
liftIO $ removeWhenExistsWith R.removeLink (d P.</> toRawFilePath file)
|
||||
|
||||
includeCredsInfo :: ParsedRemoteConfig -> CredPairStorage -> [(String, String)] -> Annex [(String, String)]
|
||||
includeCredsInfo pc@(ParsedRemoteConfig cm _) storage info = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue