From d7561bbe5e5016c70a0202a28b9992b1b5c7e075 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 8 Feb 2003 14:24:27 +0000 Subject: [PATCH] Available space now shown even if remote directory can't be found (\\remote\drive\dir_that_doesnt_exist will now give the avaible space) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2123 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index c68fd2de..bd3b3a0e 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -835,11 +835,15 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar GetUIText(IDC_DIR,state_install_directory,NSIS_MAX_STRLEN); is_valid_path=is_valid_instpath(state_install_directory); - mini_memcpy(s,state_install_directory,NSIS_MAX_STRLEN); - s[sizeof(s)-1]=0; + mystrcpy(s,state_install_directory); if (s[1] == ':') s[3]=0; else if (*(WORD*)s == CHAR2_TO_WORD('\\','\\')) // \\ path { + char *p = mystrstr(s+2,"\\"); + if (p) { + p = mystrstr(p+1,"\\"); + if (p) *p = 0; + } addtrailingslash(s); } @@ -857,12 +861,8 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar total+=g_inst_section[x].size_kb; } - // Added by Amir Szekely 24th July 2002 - // Allows 'SpaceTexts none' if (LANG_STR_TAB(LANG_SPACE_REQ)) { SetUITextNT(IDC_SPACEREQUIRED,inttosizestr(total,mystrcpy(s,LANG_STR(LANG_SPACE_REQ)))); - //if (available < total) - //SetTextColor(GetDC(GetDlgItem(hwndDlg,IDC_SPACEREQUIRED)), RGB(255,0,0)); if (available != -1) SetUITextNT(IDC_SPACEAVAILABLE,inttosizestr(available,mystrcpy(s,LANG_STR(LANG_SPACE_AVAIL)))); else