From f6de644eeac17aeb4d2438f00d02a564a1993d98 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 3 Apr 2018 13:35:58 +0200 Subject: [PATCH] now working with libuv v1.20.0 --- CMakeLists.txt | 2 +- cmake/in/libuv.in | 4 ++-- src/uvw/fs.hpp | 11 ++++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fdf6fc5..8c512ecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() # Project configuration # -project(uvw VERSION 1.7.0) +project(uvw VERSION 1.8.0) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) diff --git a/cmake/in/libuv.in b/cmake/in/libuv.in index a5e0ad53..6edc3771 100644 --- a/cmake/in/libuv.in +++ b/cmake/in/libuv.in @@ -7,7 +7,7 @@ if(WIN32) ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.19.0 + GIT_TAG v1.20.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp @@ -22,7 +22,7 @@ else() ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.19.0 + GIT_TAG v1.20.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp diff --git a/src/uvw/fs.hpp b/src/uvw/fs.hpp index c65d8d26..576c4917 100644 --- a/src/uvw/fs.hpp +++ b/src/uvw/fs.hpp @@ -90,7 +90,9 @@ enum class UVFileOpenFlags: int { enum class UVCopyFileFlags: int { - EXCL = UV_FS_COPYFILE_EXCL + EXCL = UV_FS_COPYFILE_EXCL, + FICLONE = UV_FS_COPYFILE_FICLONE, + FICLONE_FORCE = UV_FS_COPYFILE_FICLONE_FORCE }; @@ -1115,7 +1117,14 @@ public: * * `FsReq::CopyFile::EXCL`: it fails if the destination path * already exists (the default behavior is to overwrite the destination if * it exists). + * * `FsReq::CopyFile::FICLONE`: If present, it will attempt to create a + * copy-on-write reflink. If the underlying platform does not support + * copy-on-write, then a fallback copy mechanism is used. + * * `FsReq::CopyFile::FICLONE_FORCE`: If present, it will attempt to create + * a copy-on-write reflink. If the underlying platform does not support + * copy-on-write, then an error is returned. * + * @warning * If the destination path is created, but an error occurs while copying the * data, then the destination path is removed. There is a brief window of * time between closing and removing the file where another process could