History log of /libuv/src/win/fs.c (Results 1 – 25 of 211)
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 ...


# b3759772 19-Aug-2023 Brad King

win,fs: avoid winapi macro redefinition (#4123)

Adjust include order to avoid redefining `CTL_CODE`, `FILE_READ_ACCESS`,
and `FILE_WRITE_ACCESS`. Without this, compilation shows:

win,fs: avoid winapi macro redefinition (#4123)

Adjust include order to avoid redefining `CTL_CODE`, `FILE_READ_ACCESS`,
and `FILE_WRITE_ACCESS`. Without this, compilation shows:

```
...\um\winioctl.h(273): warning C4005: 'CTL_CODE': macro redefinition
...\src\win\winapi.h(4497): note: see previous definition of 'CTL_CODE'

...\um\winioctl.h(320): warning C4005: 'FILE_READ_ACCESS': macro redefinition
...\src\win\winapi.h(4488): note: see previous definition of 'FILE_READ_ACCESS'

...\um\winioctl.h(321): warning C4005: 'FILE_WRITE_ACCESS': macro redefinition
...\src\win\winapi.h(4492): note: see previous definition of 'FILE_WRITE_ACCESS'
```

show more ...


# d09441ca 13-Jul-2023 Jameson Nash

fs: fix WTF-8 decoding issue (#4092)

We forgot to mask off the high bits from the first byte, so we ended up
always failing the subsequent range check.

Refs: #2970
Fixes: ht

fs: fix WTF-8 decoding issue (#4092)

We forgot to mask off the high bits from the first byte, so we ended up
always failing the subsequent range check.

Refs: #2970
Fixes: https://github.com/nodejs/node/issues/48673

show more ...


# dde50f0e 19-Jun-2023 Ben Noordhuis

win: fix -Wpointer-to-int-cast warning


# 8f32a14a 23-May-2023 Stefan Karpinski

fs: use WTF-8 on Windows (#2970)

This allows working with valid filenames that are not well-formed
UTF-16. This is a superset of UTF-8, which does not error when it
encounters an unp

fs: use WTF-8 on Windows (#2970)

This allows working with valid filenames that are not well-formed
UTF-16. This is a superset of UTF-8, which does not error when it
encounters an unpaired surrogate but simply allows it.

Fixes: https://github.com/libuv/libuv/issues/2048
Refs: https://simonsapin.github.io/wtf-8/
Replaces: https://github.com/libuv/libuv/pull/2192 by Nikolai Vavilov <vvnicholas@gmail.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>

show more ...


# 3990fcad 12-May-2023 cui fliter

docs: fix some typos (#3984)


# 7fd7e826 18-Jan-2023 Darshan Sen

win,fs: fix readlink errno for a non-symlink file (#3719)

In Node.js, fs.readlink() on a non-symlink file used to throw an UNKNOWN
error on Windows. This change maps ERROR_NOT_A_REPARSE_

win,fs: fix readlink errno for a non-symlink file (#3719)

In Node.js, fs.readlink() on a non-symlink file used to throw an UNKNOWN
error on Windows. This change maps ERROR_NOT_A_REPARSE_POINT to
UV_EINVAL, so that now it throws EINVAL just like other platforms.

This is handled explicitly in `fs__readlink`, since elsewhere it might
map to EPERM instead (such as in `link`).

show more ...


# c17bd99f 29-Nov-2022 Stefan Stojanovic

win: fix fstat for pipes and character files (#3811)

Calling uv_fs_fstat for file types other then disk type was resulting in
error on Windows while it was retrieving data on Linux. This

win: fix fstat for pipes and character files (#3811)

Calling uv_fs_fstat for file types other then disk type was resulting in
error on Windows while it was retrieving data on Linux. This change
enables getting fstat for pipes and character files on Windows with data
fetched being as reasonable as possible.

A simple test is also added to check this behavior on all platforms. It
uses stdin, stdout and stderr. uv_fs_fstat needs to pass with disk files
pipes and character files (eg. console).

Refs: https://github.com/nodejs/node/issues/40006
Co-authored-by: Jameson Nash <vtjnash@gmail.com>

show more ...


# d54c92e3 15-Feb-2022 Jameson Nash

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

Internal functions usually have a uv__ prefix.


# 3b2c25d2 14-Feb-2022 Jameson Nash

win,fs: avoid closing an invalid handle (#3473)

While usually functional, calling CloseHandle(INVALID_HANDLE_VALUE) can
result in debug builds (and/or wine) being unhappy and aborting th

win,fs: avoid closing an invalid handle (#3473)

While usually functional, calling CloseHandle(INVALID_HANDLE_VALUE) can
result in debug builds (and/or wine) being unhappy and aborting there.

show more ...


# df78de04 13-Feb-2022 Momtchil Momtchev

win,fs: consider broken pipe error a normal EOF (#3053)

This would later get translated in src/win/error.c this way, which
previously could lead to rather confusing and inaccurate error

win,fs: consider broken pipe error a normal EOF (#3053)

This would later get translated in src/win/error.c this way, which
previously could lead to rather confusing and inaccurate error messages.

show more ...


# 9604b61d 16-Oct-2021 Darshan Sen

win,fs: fix error code in uv_fs_read() and uv_fs_write() (#3303)

Just like the Unix counterpart, uv_fs_read() and uv_fs_write() should
throw an EBADF instead of throwing an EPERM when th

win,fs: fix error code in uv_fs_read() and uv_fs_write() (#3303)

Just like the Unix counterpart, uv_fs_read() and uv_fs_write() should
throw an EBADF instead of throwing an EPERM when the passed fd has not
been opened with the right flags.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

show more ...


# 103dbaed 21-Jun-2021 Darshan Sen

Revert "win,fs: correct error code in uv_fs_read and uv_fs_write"

This reverts commit 93942168281680bca60ddbd8d4c596fabcb8efd9.

Refs: https://github.com/libuv/libuv/pull/3180
Re

Revert "win,fs: correct error code in uv_fs_read and uv_fs_write"

This reverts commit 93942168281680bca60ddbd8d4c596fabcb8efd9.

Refs: https://github.com/libuv/libuv/pull/3180
Refs: https://github.com/libuv/libuv/pull/3205
PR-URL: https://github.com/libuv/libuv/pull/3211
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# 93942168 28-May-2021 Darshan Sen

win,fs: correct error code in uv_fs_read and uv_fs_write

Just like the unix counterpart, uv_fs_read and uv_fs_write should throw
an EBADF instead of manually throwing an EPERM when the p

win,fs: correct error code in uv_fs_read and uv_fs_write

Just like the unix counterpart, uv_fs_read and uv_fs_write should throw
an EBADF instead of manually throwing an EPERM when the passed fd has
not been opened with the right access flags.

PR-URL: https://github.com/libuv/libuv/pull/3180
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# 882ee253 12-May-2021 SeverinLeonhardt

win,fs: fix C4090 warning with MSVC

When compiling the current code MSVC prints this warning:

warning C4090: '=': different 'const' qualifiers

This warning was introduc

win,fs: fix C4090 warning with MSVC

When compiling the current code MSVC prints this warning:

warning C4090: '=': different 'const' qualifiers

This warning was introduced with dc6fdcd where the `(char*)` cast for
the call to `wcstombs` was removed.

Re-adding this cast to silence the warning.

PR-URL: https://github.com/libuv/libuv/pull/3146
Refs: https://github.com/libuv/libuv/pull/2938
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0, v1.35.0, v1.34.2, v1.34.1
# dd8662b6 06-Jan-2020 Nikolai Vavilov

win, fs: mkdir really return UV_EINVAL for invalid names

Makes uv_fs_mkdir return UV_EINVAL for invalid directory names instead
of UV_ENOENT.

Refs: https://github.com/nodejs/nod

win, fs: mkdir really return UV_EINVAL for invalid names

Makes uv_fs_mkdir return UV_EINVAL for invalid directory names instead
of UV_ENOENT.

Refs: https://github.com/nodejs/node/issues/31177
PR-URL: https://github.com/libuv/libuv/pull/2601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 8d5af5e7 24-Mar-2020 Ben Noordhuis

fs: fix utime/futime timestamp rounding errors

`uv_fs_utime()` and `uv_fs_futime()` receive the timestamp as
a `double` and then convert it to `struct timeval` or `struct timespec`
w

fs: fix utime/futime timestamp rounding errors

`uv_fs_utime()` and `uv_fs_futime()` receive the timestamp as
a `double` and then convert it to `struct timeval` or `struct timespec`
where necessary but the calculation for the sub-second part exhibited
rounding errors for dates in the deep past or the far-flung future,
causing the timestamps to be off by sometimes over half a second on
unix, or to be reinterpreted as unsigned and end up off by more than
just sign but many also decades.

Fixes: https://github.com/nodejs/node/issues/32369 (partially)
PR-URL: https://github.com/libuv/libuv/pull/2747
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# e208100f 12-Aug-2020 tjarlama <59913901+tjarlama@users.noreply.github.com>

fs: clobber req->path on uv_fs_mkstemp() error

Contents of template variable passed for posix call mkstemp on error
code EINVAL is unknown. On AIX platform, template will get clobbered

fs: clobber req->path on uv_fs_mkstemp() error

Contents of template variable passed for posix call mkstemp on error
code EINVAL is unknown. On AIX platform, template will get clobbered
on EINVAL and any attempt to read template might result in error.

In libuv, req->path is passed directly to the mkstemp call and
behavior of this string on error is platform dependent. To avoid
portability issues, it's better to have a common behavior on all
platform. For both unix and windows platform libuv will rewrite path
with an empty string on all error cases.

Fixes: https://github.com/libuv/libuv/issues/2913
Refs: https://github.com/nodejs/node/pull/33549
Refs: https://github.com/libuv/libuv/pull/2933
PR-URL: https://github.com/libuv/libuv/pull/2938
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

# ae9d5207 06-Aug-2020 Jameson Nash

win,fs: avoid implicit access to _doserrno

It is easy to miss that this is accessing MSVC state, while several
users of it were only setting GetLastError.

Refs: https://github.c

win,fs: avoid implicit access to _doserrno

It is easy to miss that this is accessing MSVC state, while several
users of it were only setting GetLastError.

Refs: https://github.com/libuv/libuv/pull/2921
PR-URL: https://github.com/libuv/libuv/pull/2945
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

# 98035e2a 04-Aug-2020 escherstair

win,nfc: removed some unused variables

PR-URL: https://github.com/libuv/libuv/pull/2854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janea

win,nfc: removed some unused variables

PR-URL: https://github.com/libuv/libuv/pull/2854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

# f6e74b1e 04-Aug-2020 escherstair

win,nfc: fix integer comparison signedness

PR-URL: https://github.com/libuv/libuv/pull/2854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@j

win,nfc: fix integer comparison signedness

PR-URL: https://github.com/libuv/libuv/pull/2854
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

# 509214d6 04-Aug-2020 Mustafa M

win,fs: use CreateDirectoryW instead of _wmkdir

No functional changes are intended [NFCI], but this may make it easier
in the future to implement and respect the `modes` flag.

P

win,fs: use CreateDirectoryW instead of _wmkdir

No functional changes are intended [NFCI], but this may make it easier
in the future to implement and respect the `modes` flag.

PR-URL: https://github.com/libuv/libuv/pull/2921
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

# e7ebae26 29-Apr-2020 Bartosz Sosnowski

win, fs: add IO_REPARSE_TAG_APPEXECLINK support

Adds support for IO_REPARSE_TAG_APPEXECLINK reparse points, used by
Windows Store.

Ref: https://github.com/nodejs/node/issues/330

win, fs: add IO_REPARSE_TAG_APPEXECLINK support

Adds support for IO_REPARSE_TAG_APPEXECLINK reparse points, used by
Windows Store.

Ref: https://github.com/nodejs/node/issues/33024

PR-URL: https://github.com/libuv/libuv/pull/2812
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

# 45728582 29-Apr-2020 Bartosz Sosnowski

fs: report original error

Exposes the original system error of the filesystem syscalls. Adds a new
uv_fs_get_system_error which returns orignal errno on Linux or
GetLastError on Wind

fs: report original error

Exposes the original system error of the filesystem syscalls. Adds a new
uv_fs_get_system_error which returns orignal errno on Linux or
GetLastError on Windows.

Ref: https://github.com/libuv/libuv/issues/2348

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

show more ...

123456789