Message-Id: <
199802101828.NAA10420@aatma.engin.umich.edu>
Subject: Re: BUG: opendir and UNC names on NT
p4raw-id: //depot/win32/perl@494
/* check to see if filename is a directory */
if (win32_stat(filename, &sbuf) < 0 || (sbuf.st_mode & S_IFDIR) == 0) {
- return NULL;
+ /* CRT is buggy on sharenames, so make sure it really isn't */
+ DWORD r = GetFileAttributes(filename);
+ if (r == 0xffffffff || !(r & FILE_ATTRIBUTE_DIRECTORY))
+ return NULL;
}
/* get the file system characteristics */