remove write bit when storing to local gcrypt repo
Same as is done by rsync, and for regular git repos.
This commit is contained in:
parent
d12becfdde
commit
d3778e631b
1 changed files with 8 additions and 3 deletions
|
@ -300,9 +300,14 @@ store :: Remote -> Remote.Rsync.RsyncOpts -> Storer
|
||||||
store r rsyncopts
|
store r rsyncopts
|
||||||
| not $ Git.repoIsUrl (repo r) =
|
| not $ Git.repoIsUrl (repo r) =
|
||||||
byteStorer $ \k b p -> guardUsable (repo r) False $ liftIO $ do
|
byteStorer $ \k b p -> guardUsable (repo r) False $ liftIO $ do
|
||||||
let dest = gCryptLocation r k
|
let f = gCryptLocation r k
|
||||||
createDirectoryIfMissing True $ parentDir dest
|
let d = parentDir f
|
||||||
meteredWriteFile p dest b
|
createDirectoryIfMissing True d
|
||||||
|
allowWrite d
|
||||||
|
void $ liftIO $ tryIO $ allowWrite f
|
||||||
|
meteredWriteFile p f b
|
||||||
|
preventWrite f
|
||||||
|
preventWrite d
|
||||||
return True
|
return True
|
||||||
| Git.repoIsSsh (repo r) = if isShell r
|
| Git.repoIsSsh (repo r) = if isShell r
|
||||||
then fileStorer $ \k f p -> Ssh.rsyncHelper (Just p)
|
then fileStorer $ \k f p -> Ssh.rsyncHelper (Just p)
|
||||||
|
|
Loading…
Reference in a new issue