mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-20 02:12:51 +02:00
commit bash-20120420 snapshot
This commit is contained in:
+24
@@ -2988,6 +2988,30 @@ bash_filename_stat_hook (dirname)
|
||||
free (new_dirname);
|
||||
}
|
||||
|
||||
/* This is very similar to the code in bash_directory_completion_hook below,
|
||||
but without spelling correction and not worrying about whether or not
|
||||
we change relative pathnames. */
|
||||
if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1]))
|
||||
{
|
||||
char *temp1, *temp2;
|
||||
|
||||
t = get_working_directory ("symlink-hook");
|
||||
temp1 = make_absolute (local_dirname, t);
|
||||
free (t);
|
||||
temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
|
||||
|
||||
/* If we can't canonicalize, bail. */
|
||||
if (temp2 == 0)
|
||||
{
|
||||
free (temp1);
|
||||
return return_value;
|
||||
}
|
||||
|
||||
free (local_dirname);
|
||||
*dirname = temp2;
|
||||
free (temp1);
|
||||
}
|
||||
|
||||
return (return_value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user