From af8d176b6291c45bffb3e2d2e98d6260571c99af Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 20 Apr 2016 05:39:34 -0400 Subject: install mode: handle .lai install arguments as gracefully as possible. --- src/logic/slbt_exec_install.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/logic/slbt_exec_install.c') diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c index ffb689a..008c89d 100644 --- a/src/logic/slbt_exec_install.c +++ b/src/logic/slbt_exec_install.c @@ -244,8 +244,14 @@ static int slbt_exec_install_entry( ? false : true; + dot = strrchr(entry->arg,'.'); + + /* .lai --> .la */ + if (!fexe && dot && !strcmp(dot,".lai")) + dot[3] = 0; + /* .la ? */ - if (!fexe && (!(dot = strrchr(entry->arg,'.')) || strcmp(dot,".la"))) { + if (!fexe && (!dot || strcmp(dot,".la"))) { *src = (char *)entry->arg; *dst = dest ? 0 : (char *)last->arg; -- cgit v1.2.3