From 891fab1a7db888ae39519c43fc384509bdfb6f57 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Wed, 18 Jul 2001 18:56:11 +0000 Subject: [PATCH] find_box() should attempt to expand all filenames if none of the other methods found a match. --- config.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config.c b/config.c index f764d17..5389955 100644 --- a/config.c +++ b/config.c @@ -291,7 +291,23 @@ find_box (const char *s) config_t *p = boxes; for (; p; p = p->next) + { if (!strcmp (s, p->path) || (p->alias && !strcmp (s, p->alias))) 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; }