diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-13 14:47:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-13 14:47:23 +0000 |
commit | 79f9ee9d15cdc4e96faa69135c4a2f734577e9d6 (patch) | |
tree | 3f7efdbee7cf6bda4052f6f487563b13efb358d3 /src/bin/psql/command.c | |
parent | d785841f831fd9bc9cf11ed62d8571910a71bd0c (diff) | |
download | postgresql-79f9ee9d15cdc4e96faa69135c4a2f734577e9d6.tar.gz postgresql-79f9ee9d15cdc4e96faa69135c4a2f734577e9d6.zip |
Fix core dumps, inability to count, etc associated with canonicalize_path
patches.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index da2ab92b353..7002ebf7a20 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.122 2004/07/15 03:56:06 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.123 2004/08/13 14:47:23 tgl Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -375,7 +375,8 @@ exec_command(const char *cmd, fname = psql_scan_slash_option(scan_state, OT_NORMAL, NULL, true); expand_tilde(&fname); - canonicalize_path(fname); + if (fname) + canonicalize_path(fname); status = do_edit(fname, query_buf) ? CMD_NEWEDIT : CMD_ERROR; free(fname); } |