From 1f8ad1e75c31d4f4d80c9c1011b041a551f4fa00 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 4 Apr 2015 23:29:30 +0200 Subject: [PATCH] [BUG_FIXED] Fix a regression that system64 files cannot be opened by Notepad++. --- PowerEditor/src/NppIO.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 3029d343b..14ab924cd 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -57,17 +57,9 @@ BufferID Notepad_plus::doOpen(const TCHAR *fileName, bool isRecursive, bool isRe return BUFFER_INVALID; } assert( _tcslen( longFileName ) == getFullPathNameResult ); - - const DWORD getLongPathNameResult = ::GetLongPathName(longFileName, longFileName, longFileNameBufferSize); - if ( getLongPathNameResult == 0 ) - { - return BUFFER_INVALID; - } - if ( getLongPathNameResult > longFileNameBufferSize ) - { - return BUFFER_INVALID; - } - assert( _tcslen( longFileName ) == getLongPathNameResult ); + + // ignore the returned value of fuction due to win64 redirection system + ::GetLongPathName(longFileName, longFileName, longFileNameBufferSize); bool isSnapshotMode = backupFileName != NULL && PathFileExists(backupFileName); if (isSnapshotMode && !PathFileExists(longFileName)) // UNTITLED