finish fixing removeLink on windows
9cb250f7be
got the ones in RawFilePath,
but there were others that used the one from unix-compat, which fails at
runtime on windows. To avoid this,
import System.PosixCompat.Files hiding removeLink
This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
dce0781391
commit
a3b714ddd9
28 changed files with 73 additions and 64 deletions
|
@ -37,6 +37,7 @@ import Utility.Tor
|
|||
import Utility.FileMode
|
||||
import Types.UUID
|
||||
import Annex.ChangedRefs
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
import Control.Monad.Free
|
||||
import Control.Monad.IO.Class
|
||||
|
@ -124,7 +125,7 @@ closeConnection conn = do
|
|||
-- the callback.
|
||||
serveUnixSocket :: FilePath -> (Handle -> IO ()) -> IO ()
|
||||
serveUnixSocket unixsocket serveconn = do
|
||||
removeWhenExistsWith removeLink unixsocket
|
||||
removeWhenExistsWith R.removeLink (toRawFilePath unixsocket)
|
||||
soc <- S.socket S.AF_UNIX S.Stream S.defaultProtocol
|
||||
S.bind soc (S.SockAddrUnix unixsocket)
|
||||
-- Allow everyone to read and write to the socket,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue