find_box() should attempt to expand all filenames if none of the other
methods found a match.
This commit is contained in:
parent
0f7823a4bf
commit
891fab1a7d
16
config.c
16
config.c
|
@ -291,7 +291,23 @@ find_box (const char *s)
|
||||||
config_t *p = boxes;
|
config_t *p = boxes;
|
||||||
|
|
||||||
for (; p; p = p->next)
|
for (; p; p = p->next)
|
||||||
|
{
|
||||||
if (!strcmp (s, p->path) || (p->alias && !strcmp (s, p->alias)))
|
if (!strcmp (s, p->path) || (p->alias && !strcmp (s, p->alias)))
|
||||||
return p;
|
return p;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* check to see if the full pathname was specified on the
|
||||||
|
* command line.
|
||||||
|
*/
|
||||||
|
char *t = expand_strdup (p->path);
|
||||||
|
|
||||||
|
if (!strcmp (s, t))
|
||||||
|
{
|
||||||
|
free (t);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
free (t);
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user