From ec4fd3c2cbdde72cdf69a36dabd66da3f3481d69 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Thu, 28 Apr 2005 15:38:47 +0000 Subject: [PATCH] - The libunix.a flavour of system() no longer attempts to translate the name of a command unless it contains path separator characters. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14929 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/changes | 3 +++ library/stdlib_system.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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;