diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 15a004df13b..a040a60de29 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -1103,6 +1103,12 @@ auto QFileSystemEngine::cloneFile(int srcfd, int dstfd, const QFileSystemMetaDat ssize_t n = ::sendfile(dstfd, srcfd, nullptr, SendfileSize); if (n == -1) { + switch (errno) { + case ENOSPC: + case EIO: + return TriStateResult::Failed; + } + // if we got an error here, give up and try at an upper layer return TriStateResult::NotSupported; }