more RawFilePath conversion
Converted file mode setting to it, and follow-on changes. Compiles up through 369/646. This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
9b0dde834e
commit
2c8cf06e75
31 changed files with 239 additions and 182 deletions
|
@ -144,7 +144,7 @@ changeUserSshConfig modifier = do
|
|||
writeSshConfig :: FilePath -> String -> IO ()
|
||||
writeSshConfig f s = do
|
||||
writeFile f s
|
||||
setSshConfigMode f
|
||||
setSshConfigMode (toRawFilePath f)
|
||||
|
||||
{- Ensure that the ssh config file lacks any group or other write bits,
|
||||
- since ssh is paranoid about not working if other users can write
|
||||
|
@ -153,7 +153,7 @@ writeSshConfig f s = do
|
|||
- If the chmod fails, ignore the failure, as it might be a filesystem like
|
||||
- Android's that does not support file modes.
|
||||
-}
|
||||
setSshConfigMode :: FilePath -> IO ()
|
||||
setSshConfigMode :: RawFilePath -> IO ()
|
||||
setSshConfigMode f = void $ tryIO $ modifyFileMode f $
|
||||
removeModes [groupWriteMode, otherWriteMode]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue