We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 936c4af commit 7363282Copy full SHA for 7363282
src/port/copydir.c
@@ -11,7 +11,7 @@
11
* as a service.
12
*
13
* IDENTIFICATION
14
- * $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 $
15
16
*-------------------------------------------------------------------------
17
*/
@@ -234,8 +234,10 @@ fsync_fname(char *fname, bool isdir)
234
O_RDONLY | PG_BINARY,
235
S_IRUSR | S_IWUSR);
236
237
- /* Some OSs don't allow us to open directories at all */
238
- if (fd < 0 && isdir && errno == EISDIR)
+ /* Some OSs don't allow us to open directories at all
+ * (Windows returns EPERM)
239
+ */
240
+ if (fd < 0 && isdir && (errno == EISDIR || errno == EPERM))
241
return;
242
243
else if (fd < 0)
0 commit comments