cautious-file 0.1.3 → 0.1.4
raw patch · 2 files changed
+4/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- cautious-file.cabal +1/−1
- src/System/IO/Cautious.hs +3/−0
cautious-file.cabal view
@@ -1,5 +1,5 @@ name: cautious-file-version: 0.1.3+version: 0.1.4 Cabal-Version: >= 1.6 synopsis: Ways to write a file cautiously, to reduce the chances of problems such as data loss due to crashes or power failures description: If the posix flag is enabled, posix-specific functions are used to reduce the chance of data loss further
src/System/IO/Cautious.hs view
@@ -19,6 +19,7 @@ import System.IO (openTempFile) #ifdef _POSIX import System.Posix.ByteLevel (writeAllL)+import System.Posix.Files (fileMode, getFileStatus, setFdMode) import System.Posix.Fsync (fsync) import System.Posix.IO (closeFd, handleToFd) #else@@ -46,6 +47,8 @@ #ifdef _POSIX fd <- handleToFd handle writeAllL fd bs+ st <- getFileStatus cfp+ setFdMode fd $ fileMode st fsync fd closeFd fd #else