When I was using uv_error_to_io_error() it wasn't working for some reason. Copying this code works correctly for both unix and windows. I was wondering about factoring out this code to somewhere where it can be used with both backends.