more OsPath conversion

Sponsored-by: Nicholas Golder-Manning
This commit is contained in:
Joey Hess 2025-01-29 11:53:20 -04:00
parent 0376bc5ee0
commit 27305042f3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
24 changed files with 180 additions and 153 deletions

View file

@ -64,7 +64,7 @@ hookWrite h r = ifM (doesFileExist f)
-- they typically use unix newlines, which does work there
-- and makes the repository more portable.
viaTmp F.writeFile' f (encodeBS (hookScript h))
void $ tryIO $ modifyFileMode (fromOsPath f) (addModes executeModes)
void $ tryIO $ modifyFileMode f (addModes executeModes)
return True
{- Removes a hook. Returns False if the hook contained something else, and