mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
Don't try to get the file time if the file wasn't found.
This commit is contained in:
parent
9c141d4a80
commit
6b1a93114a
1 changed files with 2 additions and 3 deletions
|
@ -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;i<N_CACHED_PROFILES;i++)
|
||||
{
|
||||
|
@ -762,6 +760,7 @@ static BOOL PROFILE_Open( LPCWSTR filename )
|
|||
MRUProfile[j]=MRUProfile[j-1];
|
||||
CurProfile=tempProfile;
|
||||
}
|
||||
GetFileTime(hFile, NULL, NULL, &LastWriteTime);
|
||||
if(memcmp(&CurProfile->LastWriteTime, &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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue