diff options
Diffstat (limited to 'app-shells/bash/files/bash-3.0-pwd.patch')
-rw-r--r-- | app-shells/bash/files/bash-3.0-pwd.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-3.0-pwd.patch b/app-shells/bash/files/bash-3.0-pwd.patch new file mode 100644 index 0000000..77f0918 --- /dev/null +++ b/app-shells/bash/files/bash-3.0-pwd.patch @@ -0,0 +1,16 @@ +Ripped from Fedora + +* Tue Mar 15 2005 Tim Waugh <twaugh@redhat.com> 3.0-30 +- Fix PS1 expansion crash when PWD is unset (bg #151116). + +--- bash-3.0/parse.y.pwd 2005-03-15 14:22:36.000000000 +0000 ++++ bash-3.0/parse.y 2005-03-15 14:22:37.000000000 +0000 +@@ -4103,7 +4103,7 @@ + #define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0) + #define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0) + /* Abbreviate \W as ~ if $PWD == $HOME */ +- if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, temp) == 0)) ++ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0)) + { + if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0) + { |