diff options
Diffstat (limited to 'src/port/copydir.c')
-rw-r--r-- | src/port/copydir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c index 8fcfa1acdef..d98b71933d3 100644 --- a/src/port/copydir.c +++ b/src/port/copydir.c @@ -11,7 +11,7 @@ * as a service. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/copydir.c,v 1.16 2005/10/29 00:31:52 petere Exp $ + * $PostgreSQL: pgsql/src/port/copydir.c,v 1.16.2.1 2008/03/31 01:32:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -80,13 +80,13 @@ copydir(char *fromdir, char *todir, bool recurse) (errcode_for_file_access(), errmsg("could not stat file \"%s\": %m", fromfile))); - if (fst.st_mode & S_IFDIR) + if (S_ISDIR(fst.st_mode)) { /* recurse to handle subdirectories */ if (recurse) copydir(fromfile, tofile, true); } - else if (fst.st_mode & S_IFREG) + else if (S_ISREG(fst.st_mode)) copy_file(fromfile, tofile); } |