gdb/
* auto-load.c (show_auto_load_safe_path): Accept any combination of DIRNAME_SEPARATOR and IS_DIR_SEPARATOR for wild-match.
This commit is contained in:
parent
3a11e31eb2
commit
f7bfa992df
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-05-18 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* auto-load.c (show_auto_load_safe_path): Accept any combination of
|
||||||
|
DIRNAME_SEPARATOR and IS_DIR_SEPARATOR for wild-match.
|
||||||
|
|
||||||
2012-05-18 Tom Tromey <tromey@redhat.com>
|
2012-05-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR exp/13907:
|
PR exp/13907:
|
||||||
|
|
|
@ -241,7 +241,15 @@ static void
|
||||||
show_auto_load_safe_path (struct ui_file *file, int from_tty,
|
show_auto_load_safe_path (struct ui_file *file, int from_tty,
|
||||||
struct cmd_list_element *c, const char *value)
|
struct cmd_list_element *c, const char *value)
|
||||||
{
|
{
|
||||||
if (strcmp (value, "/") == 0)
|
const char *cs;
|
||||||
|
|
||||||
|
/* Check if user has entered either "/" or for example ":".
|
||||||
|
But while more complicate content like ":/foo" would still also
|
||||||
|
permit any location do not hide those. */
|
||||||
|
|
||||||
|
for (cs = value; *cs && (*cs == DIRNAME_SEPARATOR || IS_DIR_SEPARATOR (*cs));
|
||||||
|
cs++);
|
||||||
|
if (*cs == 0)
|
||||||
fprintf_filtered (file, _("Auto-load files are safe to load from any "
|
fprintf_filtered (file, _("Auto-load files are safe to load from any "
|
||||||
"directory.\n"));
|
"directory.\n"));
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue