1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Fix core dumps, inability to count, etc associated with canonicalize_path

patches.
This commit is contained in:
Tom Lane
2004-08-13 14:47:23 +00:00
parent d785841f83
commit 79f9ee9d15
4 changed files with 13 additions and 10 deletions

View File

@ -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);
}