LIB: improve unsafeCopyFile doc

This commit is contained in:
Julian Ospald 2016-04-10 04:09:29 +02:00
parent 5bcbbcc69c
commit bd022956f5
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -323,6 +323,9 @@ unsafeCopyFile cm from@(_ :/ RegFile {}) to@(_ :/ Dir {}) fn
Strict -> throwFileDoesExist to'
_ -> return ()
-- from sendfile(2) manpage:
-- Applications may wish to fall back to read(2)/write(2) in the case
-- where sendfile() fails with EINVAL or ENOSYS.
catchErrno [eINVAL, eNOSYS]
(sendFileCopy (fullPathS from) (P.fromAbs to'))
(void $ fallbackCopy (fullPathS from) (P.fromAbs to'))