bring back OsPath changes
I hope that the windows test suite failure on appveyor was fixed by updating to a newer windows there. I have not been able to reproduce that failure in a windows 11 VM run locally.
This commit is contained in:
parent
f0ab439c95
commit
84291b6014
119 changed files with 1003 additions and 647 deletions
|
@ -27,6 +27,8 @@ import Control.Monad.Catch
|
|||
import Utility.Exception
|
||||
import Utility.FileSystemEncoding
|
||||
import qualified Utility.RawFilePath as R
|
||||
import qualified Utility.FileIO as F
|
||||
import Utility.OsPath
|
||||
|
||||
{- Applies a conversion function to a file's mode. -}
|
||||
modifyFileMode :: RawFilePath -> (FileMode -> FileMode) -> IO ()
|
||||
|
@ -178,7 +180,7 @@ writeFileProtected' :: RawFilePath -> (Handle -> IO ()) -> IO ()
|
|||
writeFileProtected' file writer = bracket setup cleanup writer
|
||||
where
|
||||
setup = do
|
||||
h <- protectedOutput $ openFile (fromRawFilePath file) WriteMode
|
||||
h <- protectedOutput $ F.openFile (toOsPath file) WriteMode
|
||||
void $ tryIO $ modifyFileMode file $ removeModes otherGroupModes
|
||||
return h
|
||||
cleanup = hClose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue