fixed CreateDirectory error flag

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2723 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-07-16 18:03:07 +00:00
parent 711c4c19a2
commit 7d6958e253
2 changed files with 6 additions and 4 deletions

View file

@ -248,12 +248,16 @@ static int NSISCALL ExecuteEntry(entry *entry_)
else break;
while (c)
{
WIN32_FIND_DATA *fd;
while (*p != '\\' && *p) p=CharNext(p);
c=*p;
*p=0;
if (!file_exists(buf1)) {
g_flags.exec_error += !CreateDirectory(buf1,NULL);
fd = file_exists(buf1);
if (!fd) {
if (!CreateDirectory(buf1,NULL))
g_flags.exec_error++;
}
else if ((fd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) g_flags.exec_error++;
*p++ = c;
}
}

View file

@ -4,8 +4,6 @@ TODO
NSIS
* CreateDirectory error flag on files found instead of dirs
* SetCurInstType should work without the components page
* component page for uninstaller, multiple sections