open on paths starting with // fails on win32

This commit is contained in:
Andrew Tridgell committed 2000-01-23 03:00:27 +00:00
1 parent 3060d4aa1d
commit b0f3f5784c
1 file changed
+3
+3
View File
@@ -84,6 +84,9 @@ int do_open(char *pathname, int flags, mode_t mode)
/* for Windows */
flags |= O_BINARY;
#endif
/* some systems can't handle a double / */
if (pathname[0] == '/' && pathname[1] == '/') pathname++;
return open(pathname, flags, mode);
}