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 43
43
* Portions Copyright (c) 1994, Regents of the University of California
44
44
* Portions taken from FreeBSD.
45
45
*
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 $
47
47
*
48
48
*-------------------------------------------------------------------------
49
49
*/
@@ -801,7 +801,6 @@ static bool
801
801
mkdatadir (char * subdir )
802
802
{
803
803
char * path ;
804
- int res ;
805
804
806
805
path = xmalloc (strlen (pg_data ) + 2 +
807
806
(subdir == NULL ? 0 : strlen (subdir )));
@@ -811,13 +810,7 @@ mkdatadir(char *subdir)
811
810
else
812
811
strcpy (path , pg_data );
813
812
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 );
821
814
}
822
815
823
816
You can’t perform that action at this time.
0 commit comments