projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
772a5f1
)
In pg_upgrade, clean up handling of invalid directory specification by
author
Bruce Momjian
<bruce@momjian.us>
Thu, 19 May 2011 02:22:40 +0000
(22:22 -0400)
committer
Bruce Momjian
<bruce@momjian.us>
Thu, 19 May 2011 02:22:40 +0000
(22:22 -0400)
checking the stat() errno value more strictly.
contrib/pg_upgrade/exec.c
patch
|
blob
|
blame
|
history
diff --git
a/contrib/pg_upgrade/exec.c
b/contrib/pg_upgrade/exec.c
index a8f455d2b845557dca8029ba0084dbc2d10a342b..93c923c556ae13fe890036b37a21150451a507fc 100644
(file)
--- a/
contrib/pg_upgrade/exec.c
+++ b/
contrib/pg_upgrade/exec.c
@@
-70,9
+70,9
@@
is_server_running(const char *datadir)
if ((fd = open(path, O_RDONLY, 0)) < 0)
{
- if (errno != ENOENT)
- /* issue a warning but continue so we can throw a clearer error later */
- pg_log(PG_
WARNING
, "could not open file \"%s\" for reading\n",
+ /* ENOTDIR means we will throw a more useful error later */
+ if (errno != ENOENT && errno != ENOTDIR)
+ pg_log(PG_
FATAL
, "could not open file \"%s\" for reading\n",
path);
return false;