summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2002-10-23 21:53:09 +0000
committerfjoe <fjoe@FreeBSD.org>2002-10-23 21:53:09 +0000
commitfcb4e16fb9e8ba9253484923a2c7d82d23612c2f (patch)
tree4224f59cb80e6a1b2a25dde83707aaf70a8796e8
parent77809448426f6f1e9e7a6c1b27da5a64624a522c (diff)
downloadFreeBSD-ports-fcb4e16fb9e8ba9253484923a2c7d82d23612c2f.zip
FreeBSD-ports-fcb4e16fb9e8ba9253484923a2c7d82d23612c2f.tar.gz
Stop complaining about 'Couldn't change to ...' when shell is tcsh.
PR: 36685
-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 0000000..a1af27f
--- /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)
OpenPOWER on IntegriCloud