File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1111 * as a service.
1212 *
1313 * 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 $
1515 *
1616 *-------------------------------------------------------------------------
1717 */
@@ -234,8 +234,10 @@ fsync_fname(char *fname, bool isdir)
234234 O_RDONLY | PG_BINARY ,
235235 S_IRUSR | S_IWUSR );
236236
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 ))
239241 return ;
240242
241243 else if (fd < 0 )
You can’t perform that action at this time.
0 commit comments