agent: fix creating empty file for XFTP to close file (#851)

This commit is contained in:
Evgeny Poberezkin
2023-09-21 11:57:00 +01:00
committed by GitHub
parent 3828a9591c
commit 8d47f69083

View File

@@ -134,9 +134,7 @@ toFSFilePath :: AgentMonad m => FilePath -> m FilePath
toFSFilePath f = (</> f) <$> getXFTPWorkPath
createEmptyFile :: AgentMonad m => FilePath -> m ()
createEmptyFile fPath = do
h <- openFile fPath AppendMode
liftIO $ B.hPut h "" >> hFlush h
createEmptyFile fPath = liftIO $ B.writeFile fPath ""
addXFTPRcvWorker :: AgentMonad m => AgentClient -> Maybe XFTPServer -> m ()
addXFTPRcvWorker c = addWorker c xftpRcvWorkers runXFTPRcvWorker runXFTPRcvLocalWorker