Skip to content

Commit 1ecafd6

Browse files
committed
Buildfarm still unhappy, so I'll bet it's EACCES not EPERM.
1 parent a102090 commit 1ecafd6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/port/copydir.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
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)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy