Skip to content
Snippets Groups Projects
Commit 73632828 authored by Greg Stark's avatar Greg Stark
Browse files

add EPERM to the list of return codes to expect from opening directories based on Vista results

parent 936c4af1
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* as a service. * as a service.
* *
* IDENTIFICATION * 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) ...@@ -234,8 +234,10 @@ fsync_fname(char *fname, bool isdir)
O_RDONLY | PG_BINARY, O_RDONLY | PG_BINARY,
S_IRUSR | S_IWUSR); S_IRUSR | S_IWUSR);
/* Some OSs don't allow us to open directories at all */ /* Some OSs don't allow us to open directories at all
if (fd < 0 && isdir && errno == EISDIR) * (Windows returns EPERM)
*/
if (fd < 0 && isdir && (errno == EISDIR || errno == EPERM))
return; return;
else if (fd < 0) else if (fd < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment