honor core.sharedRepository when making all the other files in the annex
Lock files, directories, etc.
This commit is contained in:
parent
7e45712d19
commit
b98b69e8c6
8 changed files with 119 additions and 33 deletions
|
@ -75,6 +75,17 @@ isExecutable mode = combineModes ebits `intersectFileModes` mode /= 0
|
|||
where
|
||||
ebits = [ownerExecuteMode, groupExecuteMode, otherExecuteMode]
|
||||
|
||||
{- Runs an action without that pesky umask influencing it, unless the
|
||||
- passed FileMode is the standard one. -}
|
||||
noUmask :: FileMode -> IO a -> IO a
|
||||
noUmask mode a
|
||||
| mode == stdFileMode = a
|
||||
| otherwise = bracket setup cleanup go
|
||||
where
|
||||
setup = setFileCreationMask nullFileMode
|
||||
cleanup = setFileCreationMask
|
||||
go _ = a
|
||||
|
||||
combineModes :: [FileMode] -> FileMode
|
||||
combineModes [] = undefined
|
||||
combineModes [m] = m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue