From 90d88f32d126fae1de2f8984f5d55d7a72f98578 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 21 Feb 2015 12:21:14 +0000 Subject: Expand ARexx script locations on NetSurf's process. This resolves a problem with scripts sometimes not running when they are relative to PROGDIR: and stops PROGDIR: being requested under OS3. Fixes #2271 --- amiga/arexx.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'amiga/arexx.c') diff --git a/amiga/arexx.c b/amiga/arexx.c index 183b8fc98..3b386d3ad 100644 --- a/amiga/arexx.c +++ b/amiga/arexx.c @@ -142,8 +142,15 @@ void ami_arexx_handle(void) void ami_arexx_execute(char *script) { - LOG(("Executing script: %s", script)); - IDoMethod(arexx_obj, AM_EXECUTE, script, NULL, NULL, NULL, NULL, NULL); + char full_script_path[1025]; + BPTR lock; + + if(lock = Lock(script, ACCESS_READ)) { + DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH); + LOG(("Executing script: %s", full_script_path)); + IDoMethod(arexx_obj, AM_EXECUTE, full_script_path, NULL, NULL, NULL, NULL, NULL); + UnLock(lock); + } } void ami_arexx_cleanup(void) -- cgit v1.2.3