diff options
Diffstat (limited to 'src/port/copydir.c')
-rw-r--r-- | src/port/copydir.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c index 29fbad8e259..97677576b84 100644 --- a/src/port/copydir.c +++ b/src/port/copydir.c @@ -3,16 +3,16 @@ * it requires a Window handle which prevents it from working when invoked * as a service. * - * $Header: /cvsroot/pgsql/src/port/Attic/copydir.c,v 1.5 2003/09/10 20:12:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/port/Attic/copydir.c,v 1.5.2.1 2004/02/23 23:03:43 tgl Exp $ */ #include "postgres.h" +#include "storage/fd.h" + #undef mkdir /* no reason to use that macro because we * ignore the 2nd arg */ -#include <dirent.h> - /* * copydir: copy a directory (we only need to go one level deep) @@ -37,7 +37,7 @@ copydir(char *fromdir, char *todir) errmsg("could not create directory \"%s\": %m", todir))); return -1; } - xldir = opendir(fromdir); + xldir = AllocateDir(fromdir); if (xldir == NULL) { ereport(WARNING, @@ -55,11 +55,11 @@ copydir(char *fromdir, char *todir) ereport(WARNING, (errcode_for_file_access(), errmsg("could not copy file \"%s\": %m", fromfl))); - closedir(xldir); + FreeDir(xldir); return -1; } } - closedir(xldir); + FreeDir(xldir); return 0; } |