diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 60847a39..604cfcec 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -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; } } diff --git a/TODO.txt b/TODO.txt index 6f69a08b..81ddbd37 100644 --- a/TODO.txt +++ b/TODO.txt @@ -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