File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 4343 * Portions Copyright (c) 1994, Regents of the University of California
4444 * Portions taken from FreeBSD.
4545 *
46- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.15 2003/11/29 19:52:04 pgsql Exp $
46+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.16 2003/12/01 23:15:47 momjian Exp $
4747 *
4848 *-------------------------------------------------------------------------
4949 */
@@ -801,7 +801,6 @@ static bool
801801mkdatadir (char * subdir )
802802{
803803 char * path ;
804- int res ;
805804
806805 path = xmalloc (strlen (pg_data ) + 2 +
807806 (subdir == NULL ? 0 : strlen (subdir )));
@@ -811,13 +810,7 @@ mkdatadir(char *subdir)
811810 else
812811 strcpy (path , pg_data );
813812
814- res = mkdir (path , 0700 );
815- if (res == 0 )
816- return true;
817- else if (subdir == NULL || errno != ENOENT )
818- return false;
819- else
820- return !mkdir_p (path , 0700 );
813+ return (mkdir_p (path , 0700 ) == 0 );
821814}
822815
823816
You can’t perform that action at this time.
0 commit comments