I found one thing about this issue.
I tryed to debug following commands
```
node -e
"console.log(fs.statSync('C:\\Users\\knaito\\Documents\\work\\cordova-develop\\test001\\foo'));"
```
by using VisualStudio 2017
where foo is a `symlink` pointing to other directory.
Then I found the error becomes from
```
INLINE static void fs__stat_impl(uv_fs_t* req, int do_lstat) {
HANDLE handle;
DWORD flags;
flags = FILE_FLAG_BACKUP_SEMANTICS;
if (do_lstat) {
flags |= FILE_FLAG_OPEN_REPARSE_POINT;
}
handle = CreateFileW(req->file.pathw,
FILE_READ_ATTRIBUTES,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
NULL,
OPEN_EXISTING,
flags,
NULL);
if (handle == INVALID_HANDLE_VALUE) {
SET_REQ_WIN32_ERROR(req, GetLastError());
return;
}
...
```
in `deps/uv/src/win/fs.c` .
See
https://github.com/nodejs/node/blob/9b292272ff3d71a0ebabe46d040346dbd34585db/deps/uv/src/win/fs.c#L1252
`CreateFileW` returns `INVALID_HANDLE_VALUE` for a `symlink` pointing to other
directory.
Because `CreateFileW` is a Win32API function, I could not investigate it more
detailed.
[ Full content available at: https://github.com/apache/cordova-lib/issues/701 ]
This message was relayed via gitbox.apache.org for [email protected]