summaryrefslogtreecommitdiff
path: root/misc/mc/files/patch-src::subshell.c
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2002-10-23 21:53:09 +0000
committerMax Khon <fjoe@FreeBSD.org>2002-10-23 21:53:09 +0000
commit98d5b07d60d88147e7976197b5b32b1e50b8cbf7 (patch)
tree46d34a7fa5e28d80673c1c73f1edad4ae6e0a521 /misc/mc/files/patch-src::subshell.c
parentAdd ruby-text-format, Text::Format for Ruby. (diff)
Stop complaining about 'Couldn't change to ...' when shell is tcsh.
PR: 36685
Diffstat (limited to '')
-rw-r--r--misc/mc/files/patch-src::subshell.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/misc/mc/files/patch-src::subshell.c b/misc/mc/files/patch-src::subshell.c
new file mode 100644
index 000000000000..a1af27f4e718
--- /dev/null
+++ b/misc/mc/files/patch-src::subshell.c
@@ -0,0 +1,25 @@
+--- src/subshell.c.orig Mon Oct 21 01:43:29 2002
++++ src/subshell.c Mon Oct 21 02:37:56 2002
+@@ -852,6 +852,8 @@
+ /* If it actually changed the directory it returns true */
+ void do_subshell_chdir (const char *directory, int do_update, int reset_prompt)
+ {
++ char buf[MAXPATHLEN];
++
+ if (!(subshell_state == INACTIVE && strcmp (subshell_cwd, cpanel->cwd))){
+ /* We have to repaint the subshell prompt if we read it from
+ * the main program. Please note that in the code after this
+@@ -878,7 +880,12 @@
+ subshell_state = RUNNING_COMMAND;
+ feed_subshell (QUIETLY, FALSE);
+
+- if (subshell_alive && strcmp (subshell_cwd, cpanel->cwd) && strcmp (cpanel->cwd, "."))
++ if (subshell_alive
++ && strcmp (subshell_cwd, cpanel->cwd)
++ && strcmp (cpanel->cwd, ".")
++ && (subshell_type != TCSH ||
++ realpath (subshell_cwd, buf) == NULL ||
++ strcmp (cpanel->cwd, buf)))
+ fprintf (stderr, _("Warning: Couldn't change to %s.\n"), cpanel->cwd);
+
+ if (reset_prompt)