File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
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.35 2010/03/01 00:04:06 stark Exp $
14+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.36 2010/03/01 14:54:00 tgl Exp $
1515 *
1616 *-------------------------------------------------------------------------
1717 */
@@ -221,8 +221,9 @@ fsync_fname(char *fname, bool isdir)
221221 int fd ;
222222 int returncode ;
223223
224- /* Some OSs require directories to be opened read-only whereas
225- * other systems don't allow us to fsync files opened read-only so
224+ /*
225+ * Some OSs require directories to be opened read-only whereas
226+ * other systems don't allow us to fsync files opened read-only; so
226227 * we need both cases here
227228 */
228229 if (!isdir )
@@ -234,10 +235,11 @@ fsync_fname(char *fname, bool isdir)
234235 O_RDONLY | PG_BINARY ,
235236 S_IRUSR | S_IWUSR );
236237
237- /* Some OSs don't allow us to open directories at all
238- * (Windows returns EPERM)
238+ /*
239+ * Some OSs don't allow us to open directories at all
240+ * (Windows returns EACCES)
239241 */
240- if (fd < 0 && isdir && (errno == EISDIR || errno == EPERM ))
242+ if (fd < 0 && isdir && (errno == EISDIR || errno == EACCES ))
241243 return ;
242244
243245 else if (fd < 0 )
You can’t perform that action at this time.
0 commit comments