From 86051a49d8d0bb48d4372ce5c4caef83c5890c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 8 Mar 2016 09:32:39 +0100 Subject: [PATCH] win: remove duplicated code when processing fsevents PR-URL: https://github.com/libuv/libuv/pull/756 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig --- src/win/fs-event.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/win/fs-event.c b/src/win/fs-event.c index d9733a87..e774ab95 100644 --- a/src/win/fs-event.c +++ b/src/win/fs-event.c @@ -437,26 +437,15 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req, long_filenamew = NULL; } } - - /* - * We could not resolve the long form explicitly. - * We therefore use the name given by ReadDirectoryChangesW. - * This may be the long form or the 8.3 short name in some cases. - */ - if (!long_filenamew) { - filenamew = file_info->FileName; - sizew = file_info->FileNameLength / sizeof(WCHAR); - } - } else { - /* - * Removed or renamed events cannot be resolved to the long form. - * We therefore use the name given by ReadDirectoryChangesW. - * This may be the long form or the 8.3 short name in some cases. - */ - if (!long_filenamew) { - filenamew = file_info->FileName; - sizew = file_info->FileNameLength / sizeof(WCHAR); - } + } + /* + * Removed or renamed events cannot be resolved to the long form. + * We therefore use the name given by ReadDirectoryChangesW. + * This may be the long form or the 8.3 short name in some cases. + */ + if (!long_filenamew) { + filenamew = file_info->FileName; + sizew = file_info->FileNameLength / sizeof(WCHAR); } } else { /* We already have the long name of the file, so just use it. */