more RawFilePath conversion
removeFile changed to removeLink, because AFAICS it should be fine to remove non-file things here. In particular, it's fine to remove a symlink, since we're about to write a symlink. (removeLink does not remove directories, so file, symlink, and unix socket are the only possibilities.)
This commit is contained in:
parent
8f452416f7
commit
ca80c3154c
6 changed files with 13 additions and 13 deletions
|
@ -285,11 +285,11 @@ bup2GitRemote :: BupRepo -> IO Git.Repo
|
|||
bup2GitRemote "" = do
|
||||
-- bup -r "" operates on ~/.bup
|
||||
h <- myHomeDir
|
||||
Git.Construct.fromAbsPath $ h </> ".bup"
|
||||
Git.Construct.fromAbsPath $ toRawFilePath $ h </> ".bup"
|
||||
bup2GitRemote r
|
||||
| bupLocal r =
|
||||
if "/" `isPrefixOf` r
|
||||
then Git.Construct.fromAbsPath r
|
||||
then Git.Construct.fromAbsPath (toRawFilePath r)
|
||||
else giveup "please specify an absolute path"
|
||||
| otherwise = Git.Construct.fromUrl $ "ssh://" ++ host ++ slash dir
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue