From 2f8b7032c07267711c031130083bca385e4f6bf6 Mon Sep 17 00:00:00 2001 From: kichik Date: Wed, 18 Dec 2002 20:22:35 +0000 Subject: [PATCH] Only RegDLL and UnRegDLL will change the current directory so plug-ins will now work as before git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1975 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index b92bf1b7..b3d18451 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -937,11 +937,6 @@ static int NSISCALL ExecuteEntry(entry *entry_) char *buf0=process_string_fromparm_tobuf(0x00); char *buf1=process_string_fromparm_tobuf(0x11); - // suggested by Kevin Gadd (janusfury) - mystrcpy(buf3, buf0); - trimslashtoend(buf3); - SetCurrentDirectory(buf3); - h=LoadLibrary(buf0); if (h) { @@ -952,8 +947,16 @@ static int NSISCALL ExecuteEntry(entry *entry_) if (parm2) { char *buf2=process_string_fromparm_tobuf(0x22); + + // suggested by Kevin Gadd (janusfury) + mystrcpy(buf3, buf0); + trimslashtoend(buf3); + SetCurrentDirectory(buf3); + update_status_text(buf2,buf0); if (funke()) exec_errorflag++; + + SetCurrentDirectory(state_exe_directory); } else { @@ -980,7 +983,6 @@ static int NSISCALL ExecuteEntry(entry *entry_) update_status_text_from_lang(LANG_COULDNOTLOAD,buf0); log_printf2("Error registering DLL: Could not load %s",buf0); } - SetCurrentDirectory(state_exe_directory); OleUninitialize(); } else