From 6b1a93114a07f5e8a31cdb79a6eb66055eee5289 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 2 Apr 2004 19:39:37 +0000 Subject: [PATCH] Don't try to get the file time if the file wasn't found. --- dlls/kernel/profile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/kernel/profile.c b/dlls/kernel/profile.c index 3795458c467..2daf83d19f7 100644 --- a/dlls/kernel/profile.c +++ b/dlls/kernel/profile.c @@ -746,8 +746,6 @@ static BOOL PROFILE_Open( LPCWSTR filename ) WARN("Error %ld opening file %s\n", GetLastError(), debugstr_w(buffer)); return FALSE; } - - GetFileTime(hFile, NULL, NULL, &LastWriteTime); for(i=0;iLastWriteTime, &LastWriteTime, sizeof(FILETIME))) TRACE("(%s): already opened (mru=%d)\n", debugstr_w(buffer), i ); @@ -793,8 +792,8 @@ static BOOL PROFILE_Open( LPCWSTR filename ) if (hFile != INVALID_HANDLE_VALUE) { CurProfile->section = PROFILE_Load(hFile, &CurProfile->encoding); + GetFileTime(hFile, NULL, NULL, &CurProfile->LastWriteTime); CloseHandle(hFile); - memcpy(&CurProfile->LastWriteTime, &LastWriteTime, sizeof(FILETIME)); } else {