win: work around sharepoint scandir bug#636
Conversation
|
LGTM. I like your proposal of skipping the null byte like that, though I wonder if windows doesn't do any other esoteric things under some planetary alignments. |
|
That was my thinking as well. I'd like to hear @piscisaureus's opinion. |
|
Looks like this fell through the cracks :-S Maybe we should land this, Ben? |
|
Let's try pinging @piscisaureus one more time. |
|
Ping :-) |
|
Maybe @orangemocha could weigh in? Otherwise, LGTM. |
|
I think the change works as it is, so LGTM. Though I also would prefer the alternative version, of eating up spurious '\0' chars at the end, it's a bit cleaner and it also avoids allocating the extra wchar later on. If you decide to go that route, consider replacing the |
|
Updated to use a simple |
|
LGTM |
1 similar comment
|
LGTM |
It has been reported that for SharePoint connections mapped as a drive, uv_fs_scandir() returns "." and ".." entries when the expectation is that they should be filtered out. After some investigation it looks like the driver returns ".\0" and "..\0" for those entries, that is, it includes the zero byte in the filename length. Rewrite the filter to catch those entries as well. Fixes: nodejs/node#4002 PR-URL: libuv#636 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
It has been reported that for SharePoint connections mapped as a drive, uv_fs_scandir() returns "." and ".." entries when the expectation is that they should be filtered out. After some investigation it looks like the driver returns ".\0" and "..\0" for those entries, that is, it includes the zero byte in the filename length. Rewrite the filter to catch those entries as well. Fixes: nodejs/node#4002 PR-URL: libuv#636 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
It has been reported that for SharePoint connections mapped as a drive,
uv_fs_scandir() returns "." and ".." entries when the expectation is
that they should be filtered out.
After some investigation it looks like the driver returns ".\0" and
"..\0" for those entries, that is, it includes the zero byte in the
filename length. Rewrite the filter to catch those entries as well.
Fixes: nodejs/node#4002
R=@piscisaureus
Maybe a better fix is:
Thoughts?
CI: https://ci.nodejs.org/job/libuv+any-pr+multi/195/