[gnome-terminal] screen: Don't use the cwd with a custom command when creating new terminal



commit fc68d2735f8804d3c5d0d40635a27989727c3f9b
Author: Christian Persch <chpe gnome org>
Date:   Fri Mar 15 19:49:57 2013 +0100

    screen: Don't use the cwd with a custom command when creating new terminal
    
    The cwd is untrusted since it's set by the app running inside the terminal, so
    it should only be used when creating a new shell terminal, not when running a
    custom command.

 src/terminal-screen.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index fad9836..a0b46ed 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1389,7 +1389,8 @@ terminal_screen_do_exec (TerminalScreen *screen,
 
   profile = priv->profile;
 
-  if (priv->initial_working_directory)
+  if (priv->initial_working_directory &&
+      !g_settings_get_boolean (profile, TERMINAL_PROFILE_USE_CUSTOM_COMMAND_KEY))
     working_dir = priv->initial_working_directory;
   else
     working_dir = g_get_home_dir ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]