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
This commit is contained in:
parent
84b941bf63
commit
133a8b7ae6
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user