From: Greg Stark Date: Mon, 1 Mar 2010 00:04:06 +0000 (+0000) Subject: add EPERM to the list of return codes to expect from opening directories based on... X-Git-Tag: REL9_0_ALPHA5~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73632828aca2d252b4ea14706da6d2514c2750f1;p=postgresql add EPERM to the list of return codes to expect from opening directories based on Vista results --- diff --git a/src/port/copydir.c b/src/port/copydir.c index 0be12609fe..cf3e11f5bd 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.34 2010/02/28 21:05:30 stark Exp $ + * $PostgreSQL: pgsql/src/port/copydir.c,v 1.35 2010/03/01 00:04:06 stark Exp $ * *------------------------------------------------------------------------- */ @@ -234,8 +234,10 @@ fsync_fname(char *fname, bool isdir) O_RDONLY | PG_BINARY, S_IRUSR | S_IWUSR); - /* Some OSs don't allow us to open directories at all */ - if (fd < 0 && isdir && errno == EISDIR) + /* Some OSs don't allow us to open directories at all + * (Windows returns EPERM) + */ + if (fd < 0 && isdir && (errno == EISDIR || errno == EPERM)) return; else if (fd < 0)