aboutsummaryrefslogtreecommitdiff
path: root/src/port/copydir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/copydir.c')
-rw-r--r--src/port/copydir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c
index 540384597ca..a39b98f203c 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.21 2008/01/01 19:46:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.22 2008/03/31 01:31:43 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);
}