When using opendir with '\\', the following pattern is used internally by Win32 dir reading functions: '\\\\*'. The leading double backslashes has a special meaning under Win32 and refer to network shares. The opendir function then fails (because the Win32 FindFirstFile call fails). The attached patch solves the problem.