File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 42
42
* Portions Copyright (c) 1994, Regents of the University of California
43
43
* Portions taken from FreeBSD.
44
44
*
45
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.93 2005/07/25 04:52:31 tgl Exp $
45
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.94 2005/08/02 15:16:27 tgl Exp $
46
46
*
47
47
*-------------------------------------------------------------------------
48
48
*/
@@ -930,7 +930,8 @@ check_data_dir(void)
930
930
931
931
while ((file = readdir (chkdir )) != NULL )
932
932
{
933
- if (strcmp ("." , file -> d_name ) == 0 || strcmp (".." , file -> d_name ) == 0 )
933
+ if (strcmp ("." , file -> d_name ) == 0 ||
934
+ strcmp (".." , file -> d_name ) == 0 )
934
935
{
935
936
/* skip this and parent directory */
936
937
continue ;
@@ -942,6 +943,15 @@ check_data_dir(void)
942
943
}
943
944
}
944
945
946
+ #ifdef WIN32
947
+ /*
948
+ * This fix is in mingw cvs (runtime/mingwex/dirent.c rev 1.4), but
949
+ * not in released version
950
+ */
951
+ if (GetLastError () == ERROR_NO_MORE_FILES )
952
+ errno = 0 ;
953
+ #endif
954
+
945
955
closedir (chkdir );
946
956
947
957
if (errno != 0 )
You can’t perform that action at this time.
0 commit comments