aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorBartosz Sosnowski <bartosz@janeasystems.com>2018-09-06 14:21:24 +0200
committerBartosz Sosnowski <bartosz@janeasystems.com>2018-11-01 11:46:00 +0100
commite94c184c7c4a18f3de569c97caeb83f4ff98a4b2 (patch)
treee41ad34520a16be380bcd13c35fb7c19089c70d8 /docs/src
parentebb818bbf0d29139922199f38afa8c4d27d0f036 (diff)
downloadlibuv-e94c184c7c4a18f3de569c97caeb83f4ff98a4b2.tar.gz
libuv-e94c184c7c4a18f3de569c97caeb83f4ff98a4b2.zip
win,fs: retry if uv_fs_rename fails
On Windows rename operation can fail randomly in presence of antivirus or indexing software. Make `uv_fs_rename` retry up to four times with 250ms delay between attempts before giving up. PR-URL: https://github.com/libuv/libuv/pull/1981 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/fs.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/src/fs.rst b/docs/src/fs.rst
index af97ec3a..21f9e27c 100644
--- a/docs/src/fs.rst
+++ b/docs/src/fs.rst
@@ -233,6 +233,15 @@ API
Equivalent to :man:`rename(2)`.
+ .. note::
+ On Windows if this function fails with ``UV_EBUSY``, ``UV_EPERM`` or
+ ``UV_EACCES``, it will retry to rename the file up to four times with
+ 250ms wait between attempts before giving up. If both `path` and
+ `new_path` are existing directories this function will work only if
+ target directory is empty.
+
+ .. versionchanged:: 1.24.0 Added retrying and directory move support on Windows.
+
.. c:function:: int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb)
Equivalent to :man:`fsync(2)`.