Kaydet (Commit) 133a8b7a authored tarafından Enrico Tröger's avatar Enrico Tröger

Use g_shell_quote to avoid problems with special characters in the path of a filename.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1198 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 84b941bf
2007-01-16 Enrico Tröger <enrico.troeger@uvena.de>
* src/vte.c: Use g_shell_quote to avoid problems with special
characters in the path of a filename.
2007-01-16 Nick Treleaven <nick.treleaven@btinternet.com>
* tagmanager/c.c:
......
......@@ -441,8 +441,11 @@ void vte_cwd(const gchar *filename, gboolean force)
vte_get_working_directory(); // refresh vte_info.dir
if (! utils_str_equal(path, vte_info.dir))
{
gchar *cmd = g_strconcat("cd \"", path, "\"\n", NULL);
// use g_shell_quote to avoid problems with spaces, '!' or something else in path
gchar *quoted_path = g_shell_quote(path);
gchar *cmd = g_strconcat("cd ", quoted_path, "\n", NULL);
vte_send_cmd(cmd);
g_free(quoted_path);
g_free(cmd);
}
g_free(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment