History log of /libuv/src/win/fs-event.c (Results 1 – 25 of 60)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 8a499e13 22-Dec-2023 Matheus Izvekov

win: stop using deprecated names (#4253)


# f3889085 29-Oct-2023 Jameson Nash

misc: export WTF8 conversion utilities (#4021)

As promised in #2970, this attempts to migrate code to a common set of
utilities in a common place in the code and use them everywhere. Thi

misc: export WTF8 conversion utilities (#4021)

As promised in #2970, this attempts to migrate code to a common set of
utilities in a common place in the code and use them everywhere. This
also exports the functionality, since the Windows API with
WideCharToMultiByte is fairly verbose relative to what libuv and
libuv's clients typically need, so it is useful not to require clients
to reimplement this conversion logic unnecessarily (and because Windows
is not 64-bit ready here, but this implementation is.)

show more ...


# d54c92e3 15-Feb-2022 Jameson Nash

win: fix style nits [NFC] (#3474)

Internal functions usually have a uv__ prefix.


# a39009a5 08-Sep-2021 Ben Noordhuis

win,fsevent: fix uv_fs_event_stop() assert

Fix a logic error where calling uv_fs_event_stop() from the event
callback tripped on a `handle->dir_handle != INVALID_HANDLE_VALUE`
assert

win,fsevent: fix uv_fs_event_stop() assert

Fix a logic error where calling uv_fs_event_stop() from the event
callback tripped on a `handle->dir_handle != INVALID_HANDLE_VALUE`
assert in uv_fs_event_queue_readdirchanges().

Fixes: https://github.com/libuv/libuv/issues/3258
PR-URL: https://github.com/libuv/libuv/pull/3259
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0
# da7e50bb 28-Apr-2020 Bartosz Sosnowski

win: remove MAX_PATH limitations

Since Windows 10 1607 some WinApi functions no longer have a MAX_PATH
limit on the filenames length. This removes this hard-coded path length
limit f

win: remove MAX_PATH limitations

Since Windows 10 1607 some WinApi functions no longer have a MAX_PATH
limit on the filenames length. This removes this hard-coded path length
limit from various places in libuv, switching to dynamically allocating
string buffers.

Fixes: https://github.com/libuv/libuv/issues/2331

PR-URL: https://github.com/libuv/libuv/pull/2788
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.37.0, v1.36.0, v1.35.0, v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0
# d39959c8 11-Jan-2019 cjihrig

win: fix sizeof-pointer-div warning

short_path's type changed from WCHAR array to WCHAR*
in https://github.com/libuv/libuv/pull/1267, leading
to a sizeof-pointer-div warning.

win: fix sizeof-pointer-div warning

short_path's type changed from WCHAR array to WCHAR*
in https://github.com/libuv/libuv/pull/1267, leading
to a sizeof-pointer-div warning.

Fixes: https://github.com/libuv/libuv/issues/2138
PR-URL: https://github.com/libuv/libuv/pull/2139
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

Revision tags: v1.24.1, v1.24.0
# c5593b51 05-Nov-2018 Jameson Nash

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>

show more ...

Revision tags: v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0
# 672b96fa 01-Jun-2018 Carlo Marcelo Arenas Belón

win: remove req.c and other cleanup

PR-URL: https://github.com/libuv/libuv/pull/2018
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com

win: remove req.c and other cleanup

PR-URL: https://github.com/libuv/libuv/pull/2018
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 619937c7 28-Jun-2018 Ben Noordhuis

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By:

unix,win: merge handle flags

Some long overdue refactoring that unifies more of the UNIX and Windows
backends.

PR-URL: https://github.com/libuv/libuv/pull/1904
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.20.3, v1.20.2, v1.20.1, v1.20.0
# 7e865b68 08-Mar-2018 Nikolai Vavilov

win: use long directory name for handle->dirw

`uv_relative_path` assumes `dir` is a prefix of `filename`, which is not
the case when `handle->dirw` is a short path.

Refs: https:

win: use long directory name for handle->dirw

`uv_relative_path` assumes `dir` is a prefix of `filename`, which is not
the case when `handle->dirw` is a short path.

Refs: https://github.com/nodejs/node/issues/19170
PR-URL: https://github.com/libuv/libuv/pull/1769
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>

show more ...

Revision tags: v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# 671ad783 21-Mar-2017 Bartosz Sosnowski

fsevent: support for files without short name

A call to GetShortPathName can fail as files are not guaranteed to
have short name. This adds support for such case.

Fixes: https:/

fsevent: support for files without short name

A call to GetShortPathName can fail as files are not guaranteed to
have short name. This adds support for such case.

Fixes: https://github.com/libuv/libuv/issues/1258
PR-URL: https://github.com/libuv/libuv/pull/1267
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0
# 87df1448 14-Oct-2016 Ben Noordhuis

unix,windows: refactor request init logic

Fixes a TODO in src/threadpool.c. Updates the Windows code to drop the
unused `loop` parameter in calls to uv_req_init().

PR-URL: http

unix,windows: refactor request init logic

Fixes a TODO in src/threadpool.c. Updates the Windows code to drop the
unused `loop` parameter in calls to uv_req_init().

PR-URL: https://github.com/libuv/libuv/pull/1091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 463800ff 17-Mar-2017 cjihrig

win,sunos: stop handle on uv_fs_event_start() err

This commit stops the handle in uv_fs_event_start() when an
error occurs.

Fixes: https://github.com/libuv/libuv/issues/1253

win,sunos: stop handle on uv_fs_event_start() err

This commit stops the handle in uv_fs_event_start() when an
error occurs.

Fixes: https://github.com/libuv/libuv/issues/1253
PR-URL: https://github.com/libuv/libuv/pull/1257
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 02dcde08 09-Feb-2017 Vladimir Matveev

win,fs: avoid double freeing uv_fs_event_t.dirw

Set `dirw` to `pathw` after `uv_fs_event_start` is known to be completed
successfully.

Fixes: https://github.com/libuv/libuv/issu

win,fs: avoid double freeing uv_fs_event_t.dirw

Set `dirw` to `pathw` after `uv_fs_event_start` is known to be completed
successfully.

Fixes: https://github.com/libuv/libuv/issues/1221
PR-URL: https://github.com/libuv/libuv/pull/1222
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 7b07d18a 01-Aug-2016 Matej Knopp

win: ensure 32-bit printf precision

This commit removes a printf warning by casting a 64-bit
value to 32 bits.

Fixes: https://github.com/libuv/libuv/issues/955
PR-URL: https

win: ensure 32-bit printf precision

This commit removes a printf warning by casting a 64-bit
value to 32 bits.

Fixes: https://github.com/libuv/libuv/issues/955
PR-URL: https://github.com/libuv/libuv/pull/963
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 77c8abae 22-Jun-2016 cjihrig

win: compare entire filename in watch events

This commit causes Window file watching events to compare the
entire file path when filtering events. This fixes a bug where
incomplete p

win: compare entire filename in watch events

This commit causes Window file watching events to compare the
entire file path when filtering events. This fixes a bug where
incomplete path comparisons would cause invalid events to be
raised.

Refs: https://github.com/libuv/libuv/pull/682
PR-URL: https://github.com/libuv/libuv/pull/924
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v0.10.37, v1.9.1
# 46d84eae 05-May-2016 Saúl Ibarra Corretgé

win: simplified UTF16 -> UTF8 conversions

PR-URL: https://github.com/libuv/libuv/pull/859
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

# d43ee0ea 05-May-2016 Saúl Ibarra Corretgé

win: clarify fsevents handling code

The code for handling fs events is quite complex, this commits tries to
make it easier to follow.

First, there are 2 cases in which we use th

win: clarify fsevents handling code

The code for handling fs events is quite complex, this commits tries to
make it easier to follow.

First, there are 2 cases in which we use the name of the file straight
from the event (when watching a directory):

- if we cannot create the long path
- if the file got renamed or removed

So separate this logically, even if the code we need is the same.

Second, one way or anothwer we will always have some filename to report,
so remove an unnecessary if.

Third, nullify filenamew, to avoid having a dangling pointer, should the
code change.

PR-URL: https://github.com/libuv/libuv/pull/858
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 3819e482 08-Apr-2016 Michael Fero

win: fix var declaration to be C89 compliant

Visual Studio 2013+ relaxed variable declaration C89 compliance; older
compilers are strict (e.g. VS 2008 - 2012).

PR-URL: https://g

win: fix var declaration to be C89 compliant

Visual Studio 2013+ relaxed variable declaration C89 compliance; older
compilers are strict (e.g. VS 2008 - 2012).

PR-URL: https://github.com/libuv/libuv/pull/815
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.9.0
# 757e3c60 26-Jan-2016 Joran Dirk Greef

win: fix uv_relative_path and remove dead branch

wcslen() returns a size_t, not an int.

Add bounds checking to dirlen to avoid undefined if dirlen is 0.

Cache relpath size

win: fix uv_relative_path and remove dead branch

wcslen() returns a size_t, not an int.

Add bounds checking to dirlen to avoid undefined if dirlen is 0.

Cache relpath size calculation to replace redundant (- 1 + 1)
expression while still showing workings.

Change uv_relative_path return type to void and remove dead code which
branched on the return value.

PR-URL: https://github.com/libuv/libuv/pull/699
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# b44abe20 26-Jan-2016 Joran Dirk Greef

win: fix buffer overflow in fs events

When converting an absolute path to a relative path on Windows,
uv_relative_path assumed that the relative path could be no longer than
MAX_PATH

win: fix buffer overflow in fs events

When converting an absolute path to a relative path on Windows,
uv_relative_path assumed that the relative path could be no longer than
MAX_PATH characters, and would allocate a buffer of MAX_PATH characters
for the relative path.

However, where a recursive watch is started for a directory using a UNC
path, and where events within that directory occur for pathnames longer
than MAX_PATH, it is possible for the relative path to exceed MAX_PATH
characters and overflow the buffer.

This commit fixes uv_relative_path to allocate a buffer for the exact
number of characters counted in the relative path.

Fixes: https://github.com/libuv/libuv/issues/693
PR-URL: https://github.com/libuv/libuv/pull/699
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# f04d5fc3 14-Mar-2016 cjihrig

win: use native APIs for UTF conversions

This commit replaces uv_utf16_to_utf8() and uv_utf8_to_utf16()
with calls to the native Windows API equivalents.

Refs: https://github.co

win: use native APIs for UTF conversions

This commit replaces uv_utf16_to_utf8() and uv_utf8_to_utf16()
with calls to the native Windows API equivalents.

Refs: https://github.com/libuv/libuv/pull/672#discussion_r49049746
PR-URL: https://github.com/libuv/libuv/pull/762
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 86051a49 08-Mar-2016 Saúl Ibarra Corretgé

win: remove duplicated code when processing fsevents

PR-URL: https://github.com/libuv/libuv/pull/756
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig

win: remove duplicated code when processing fsevents

PR-URL: https://github.com/libuv/libuv/pull/756
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 3c59ad6d 14-Jan-2016 Nikolai Vavilov

win: fix watching root files

When passing "\\?\C:" to CreateFile, it opens the drive rather than the root
directory. So include the trailing backslash in the directory name.

Fix

win: fix watching root files

When passing "\\?\C:" to CreateFile, it opens the drive rather than the root
directory. So include the trailing backslash in the directory name.

Fixes: https://github.com/nodejs/node/issues/4643
PR-URL: https://github.com/libuv/libuv/pull/689
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.8.0
# e0250b7d 03-Dec-2015 Joran Dirk Greef

win: fix path for removed and renamed fs events

Previous behavior on Windows was to set the path to NULL for removed
and renamed fs events. This was because the path provided by
Read

win: fix path for removed and renamed fs events

Previous behavior on Windows was to set the path to NULL for removed
and renamed fs events. This was because the path provided by
ReadDirectoryChangesW might (in rare cases) be an 8.3 short name which
could then no longer be converted to a long name after the path had
been removed or renamed. This meant that the user had to detect which
path was actually deleted or renamed and required the user to rescan
the entire watched subtree, taking several seconds or more for large
subtrees.

However, ReadDirectoryChangesW is publicly documented to emit 8.3
short names if the original handle for the changed path was opened
using an 8.3 short name, and libuv may already emit 8.3 short names for
other events if the path cannot be explicitly resolved to a long name.

This commit fixes the path for removed and renamed fs events, and does
not set the path to NULL, even if the path might be an 8.3 short name.
This makes it possible for the user to do a partial scan of the
subtree, restricting the scan to paths which match the long form or 8.3
short name (even if some of these are false positive matches). This
means that deletes and renames can now be detected accurately on
Windows within a few milliseconds.

Fixes: https://github.com/libuv/libuv/issues/634
Refs: https://github.com/libuv/libuv/pull/199
PR-URL: https://github.com/libuv/libuv/pull/639
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

123