size optimization and a bit clearer code

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5639 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2008-05-10 10:44:33 +00:00
parent 931beb47e1
commit e917306682

View file

@ -985,7 +985,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
char *root;
int error = 0;
int available_set = 0;
unsigned total, available = 0xFFFFFFFF;
unsigned total, available;
GetUIText(IDC_DIR,dir);
if (!is_valid_instpath(dir))
@ -1059,7 +1059,7 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
total = (unsigned) sumsecsfield(size_kb);
if (available < total)
if (available_set && available < total)
error = NSIS_INSTDIR_NOT_ENOUGH_SPACE;
if (LANG_STR_TAB(LANG_SPACE_REQ)) {