Fixed VIAddVersionKey failing on empty inputs

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2881 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-09-08 10:38:34 +00:00
parent 9ad4dd958b
commit 148c9a1b86
2 changed files with 7 additions and 7 deletions

View file

@ -380,13 +380,13 @@ static int NSISCALL ExecuteEntry(entry *entry_)
if (overwriteflag >= 3) // check date and time
{
WIN32_FIND_DATA *ffd=file_exists(buf0);
// if it doesn't exist, overwrite flag will be off (though it doesn't really matter)
int cmp=0;
if (ffd)
{
// if first one is newer, then don't overwrite
int cmp=CompareFileTime(&ffd->ftLastWriteTime, (FILETIME*)(entry_->offsets + 3));
overwriteflag=!(cmp & (0x80000000 | (overwriteflag - 3)));
cmp=CompareFileTime(&ffd->ftLastWriteTime, (FILETIME*)(entry_->offsets + 3));
}
// if it doesn't exist, overwrite flag won't matter. it stays on off though.
overwriteflag=!(cmp & (0x80000000 | (overwriteflag - 3)));
}
if (!overwriteflag)
{