Skip to content

Commit b7ca9bd

Browse files
committed
Do not shell-quote the name of the editor, so that the editor can be a
command with arguments.
1 parent e69785d commit b7ca9bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.87 2003/01/07 20:56:06 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.88 2003/01/10 21:57:44 petere Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "command.h"
@@ -1527,7 +1527,7 @@ editFile(const char *fname)
15271527
sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1);
15281528
if (!sys)
15291529
return false;
1530-
sprintf(sys, "exec '%s' '%s'", editorName, fname);
1530+
sprintf(sys, "exec %s '%s'", editorName, fname);
15311531
result = system(sys);
15321532
if (result == -1)
15331533
psql_error("could not start editor %s\n", editorName);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy