[BUG_FIXED] Fix a regression that system64 files cannot be opened by Notepad++.

This commit is contained in:
Don Ho 2015-04-04 23:29:30 +02:00
parent 47a2a4e8d7
commit 1f8ad1e75c
1 changed files with 3 additions and 11 deletions

View File

@ -58,16 +58,8 @@ BufferID Notepad_plus::doOpen(const TCHAR *fileName, bool isRecursive, bool isRe
} }
assert( _tcslen( longFileName ) == getFullPathNameResult ); assert( _tcslen( longFileName ) == getFullPathNameResult );
const DWORD getLongPathNameResult = ::GetLongPathName(longFileName, longFileName, longFileNameBufferSize); // ignore the returned value of fuction due to win64 redirection system
if ( getLongPathNameResult == 0 ) ::GetLongPathName(longFileName, longFileName, longFileNameBufferSize);
{
return BUFFER_INVALID;
}
if ( getLongPathNameResult > longFileNameBufferSize )
{
return BUFFER_INVALID;
}
assert( _tcslen( longFileName ) == getLongPathNameResult );
bool isSnapshotMode = backupFileName != NULL && PathFileExists(backupFileName); bool isSnapshotMode = backupFileName != NULL && PathFileExists(backupFileName);
if (isSnapshotMode && !PathFileExists(longFileName)) // UNTITLED if (isSnapshotMode && !PathFileExists(longFileName)) // UNTITLED