|
11 | 11 | *as a service. |
12 | 12 | * |
13 | 13 | * IDENTIFICATION |
14 | | - * $PostgreSQL: pgsql/src/port/copydir.c,v 1.34 2010/02/28 21:05:30 stark Exp $ |
| 14 | + * $PostgreSQL: pgsql/src/port/copydir.c,v 1.35 2010/03/01 00:04:06 stark Exp $ |
15 | 15 | * |
16 | 16 | *------------------------------------------------------------------------- |
17 | 17 | */ |
@@ -234,8 +234,10 @@ fsync_fname(char *fname, bool isdir) |
234 | 234 | O_RDONLY |PG_BINARY, |
235 | 235 | S_IRUSR |S_IWUSR); |
236 | 236 |
|
237 | | -/* Some OSs don't allow us to open directories at all */ |
238 | | -if (fd<0&&isdir&&errno==EISDIR) |
| 237 | +/* Some OSs don't allow us to open directories at all |
| 238 | + * (Windows returns EPERM) |
| 239 | + */ |
| 240 | +if (fd<0&&isdir&& (errno==EISDIR||errno==EPERM)) |
239 | 241 | return; |
240 | 242 |
|
241 | 243 | elseif (fd<0) |
|