Merge branch 'ospath-mk1'
This commit is contained in:
commit
c2a48f1fa0
2 changed files with 12 additions and 9 deletions
|
@ -35,7 +35,9 @@ import System.File.OsPath
|
||||||
-- https://github.com/haskell/file-io/issues/39
|
-- https://github.com/haskell/file-io/issues/39
|
||||||
import Utility.Path.Windows
|
import Utility.Path.Windows
|
||||||
import Utility.OsPath
|
import Utility.OsPath
|
||||||
|
import System.OsPath
|
||||||
import System.IO (IO, Handle, IOMode)
|
import System.IO (IO, Handle, IOMode)
|
||||||
|
import Prelude (return)
|
||||||
import qualified System.File.OsPath as O
|
import qualified System.File.OsPath as O
|
||||||
import qualified Data.ByteString as B
|
import qualified Data.ByteString as B
|
||||||
import qualified Data.ByteString.Lazy as L
|
import qualified Data.ByteString.Lazy as L
|
||||||
|
@ -84,7 +86,10 @@ appendFile' f b = do
|
||||||
openTempFile :: OsPath -> OsPath -> IO (OsPath, Handle)
|
openTempFile :: OsPath -> OsPath -> IO (OsPath, Handle)
|
||||||
openTempFile p s = do
|
openTempFile p s = do
|
||||||
p' <- toOsPath <$> convertToWindowsNativeNamespace (fromOsPath p)
|
p' <- toOsPath <$> convertToWindowsNativeNamespace (fromOsPath p)
|
||||||
O.openTempFile p' s
|
(t, h) <- O.openTempFile p' s
|
||||||
|
-- Avoid returning mangled path from convertToWindowsNativeNamespace
|
||||||
|
let t' = p </> takeFileName t
|
||||||
|
return (t', h)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -333,8 +333,6 @@ Executable git-annex
|
||||||
P2P.Http.State
|
P2P.Http.State
|
||||||
|
|
||||||
if flag(OsPath)
|
if flag(OsPath)
|
||||||
-- Currently this build flag does not pass the test suite on Windows
|
|
||||||
if (! os(windows))
|
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
os-string (>= 2.0.0),
|
os-string (>= 2.0.0),
|
||||||
directory (>= 1.3.8.3),
|
directory (>= 1.3.8.3),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue