projects
/
users
/
gsingh
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3bc63e
)
Fix pg_upgrade build problem on Windows when using X_OK access
author
Bruce Momjian
<bruce@momjian.us>
Wed, 18 May 2011 16:13:37 +0000
(12:13 -0400)
committer
Bruce Momjian
<bruce@momjian.us>
Wed, 18 May 2011 16:13:37 +0000
(12:13 -0400)
permission check on the current directory.
contrib/pg_upgrade/exec.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pg_upgrade/exec.c
b/contrib/pg_upgrade/exec.c
index 6f1c6effabb90af13e9d8843c3292cc748c5cda0..ec2f94436bf1949f075a6d4744a525a6dc21dd41 100644
(file)
--- a/
contrib/pg_upgrade/exec.c
+++ b/
contrib/pg_upgrade/exec.c
@@
-94,7
+94,16
@@
void
verify_directories(void)
{
- if (access(".", R_OK | W_OK | X_OK) != 0)
+ if (access(".", R_OK | W_OK
+#ifndef WIN32
+ /*
+ * Directory execute permission on NTFS means "can execute scripts",
+ * which we don't care about, so skip the check. Also, X_OK is not
+ * defined in the API.
+ */
+ | X_OK
+#endif
+ ) != 0)
pg_log(PG_FATAL,
"You must have read and write access in the current directory.\n");