replace removeLink with removeFile
removeFile calls unlink so removes anything not a directory. So these are replaceable in order to convert to OsPath.
This commit is contained in:
parent
8af91a4c92
commit
5cc8d9d03b
9 changed files with 39 additions and 41 deletions
|
@ -420,10 +420,10 @@ writeRetrievedContent dest enc encc mh mp content miv = case (enc, mh, content)
|
|||
withBytes content $ \b ->
|
||||
decrypt cmd encc cipher (feedBytes b) $
|
||||
readBytes write
|
||||
liftIO $ removeWhenExistsWith R.removeLink (fromOsPath f)
|
||||
liftIO $ removeWhenExistsWith removeFile f
|
||||
(Nothing, _, FileContent f) -> do
|
||||
withBytes content write
|
||||
liftIO $ removeWhenExistsWith R.removeLink (fromOsPath f)
|
||||
liftIO $ removeWhenExistsWith removeFile f
|
||||
(Nothing, _, ByteContent b) -> write b
|
||||
where
|
||||
write b = case mh of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue