Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
1ecafd62
Commit
1ecafd62
authored
15 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Buildfarm still unhappy, so I'll bet it's EACCES not EPERM.
parent
a1020909
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/port/copydir.c
+8
-6
8 additions, 6 deletions
src/port/copydir.c
with
8 additions
and
6 deletions
src/port/copydir.c
+
8
−
6
View file @
1ecafd62
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* as a service.
* as a service.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.3
5
2010/03/01
00:04:06 stark
Exp $
* $PostgreSQL: pgsql/src/port/copydir.c,v 1.3
6
2010/03/01
14:54:00 tgl
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -221,8 +221,9 @@ fsync_fname(char *fname, bool isdir)
...
@@ -221,8 +221,9 @@ fsync_fname(char *fname, bool isdir)
int
fd
;
int
fd
;
int
returncode
;
int
returncode
;
/* Some OSs require directories to be opened read-only whereas
/*
* other systems don't allow us to fsync files opened read-only so
* Some OSs require directories to be opened read-only whereas
* other systems don't allow us to fsync files opened read-only; so
* we need both cases here
* we need both cases here
*/
*/
if
(
!
isdir
)
if
(
!
isdir
)
...
@@ -234,10 +235,11 @@ fsync_fname(char *fname, bool isdir)
...
@@ -234,10 +235,11 @@ fsync_fname(char *fname, bool isdir)
O_RDONLY
|
PG_BINARY
,
O_RDONLY
|
PG_BINARY
,
S_IRUSR
|
S_IWUSR
);
S_IRUSR
|
S_IWUSR
);
/* Some OSs don't allow us to open directories at all
/*
* (Windows returns EPERM)
* Some OSs don't allow us to open directories at all
* (Windows returns EACCES)
*/
*/
if
(
fd
<
0
&&
isdir
&&
(
errno
==
EISDIR
||
errno
==
E
PERM
))
if
(
fd
<
0
&&
isdir
&&
(
errno
==
EISDIR
||
errno
==
E
ACCES
))
return
;
return
;
else
if
(
fd
<
0
)
else
if
(
fd
<
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment