diff --git a/library/changes b/library/changes index 807ae34..45109be 100644 --- a/library/changes +++ b/library/changes @@ -20,6 +20,9 @@ of records or the size of each record is zero, both now call clearerr() to avoid giving the caller the wrong impression that an EOF or error occured. +- The libunix.a flavour of system() no longer attempts to translate the name + of a command unless it contains path separator characters. + c.lib 1.191 (9.4.2005) diff --git a/library/stdlib_system.c b/library/stdlib_system.c index 51a3881..e0c6aa9 100644 --- a/library/stdlib_system.c +++ b/library/stdlib_system.c @@ -1,5 +1,5 @@ /* - * $Id: stdlib_system.c,v 1.8 2005-04-24 08:46:37 obarthel Exp $ + * $Id: stdlib_system.c,v 1.9 2005-04-28 15:38:47 obarthel Exp $ * * :ts=4 * @@ -138,7 +138,9 @@ system(const char * command) command_name = just_the_command_name; - if(__translate_unix_to_amiga_path_name((const char **)&command_name,&command_nti) != 0) + /* Don't try to translate the name of the command unless it has + path name separator characters in it. */ + if(strchr(command_name,'/') != NULL && __translate_unix_to_amiga_path_name((const char **)&command_name,&command_nti) != 0) { result = ERROR; goto out;