mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Stop complaining about 'Couldn't change to ...' when shell is tcsh.
PR: 36685
This commit is contained in:
parent
53847a2cc3
commit
98d5b07d60
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68689
1 changed files with 25 additions and 0 deletions
25
misc/mc/files/patch-src::subshell.c
Normal file
25
misc/mc/files/patch-src::subshell.c
Normal file
|
@ -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)
|
Loading…
Add table
Reference in a new issue