summaryrefslogtreecommitdiff
path: root/fpicker/source
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-09-12 15:01:50 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-09-12 15:30:37 +0300
commit416c7533e0e37033b48213bcda0c9c6fb22e226f (patch)
tree538c10b1c3cc816163c517b7ec585473218e7346 /fpicker/source
parentac4bc54dc8682430f9b709f54da03e370af55140 (diff)
Drop Win9x code
Diffstat (limited to 'fpicker/source')
-rw-r--r--fpicker/source/win32/filepicker/getfilenamewrapper.cxx28
1 files changed, 10 insertions, 18 deletions
diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
index 0f1a1a883582..c4a20fd99204 100644
--- a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
+++ b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
@@ -83,28 +83,20 @@ namespace /* private */
{
if ( m_nBufLen - 1 > MAX_PATH )
{
- if ( (LONG32)GetVersion() < 0 )
+ DWORD nNewLen = m_nBufLen + 8;
+ wchar_t* pNewBuffer = new wchar_t[nNewLen];
+ if ( m_nBufLen > 3 && m_pBuffer[0] == (wchar_t)'\\' && m_pBuffer[1] == (wchar_t)'\\' )
{
- // this is Win 98/ME branch, such a long path can not be set
- // use the system path as fallback later
+ if ( m_pBuffer[2] == (wchar_t)'?' )
+ _snwprintf( pNewBuffer, nNewLen, L"%s", m_pBuffer );
+ else
+ _snwprintf( pNewBuffer, nNewLen, L"\\\\?\\UNC\\%s", m_pBuffer+2 );
}
else
- {
- DWORD nNewLen = m_nBufLen + 8;
- wchar_t* pNewBuffer = new wchar_t[nNewLen];
- if ( m_nBufLen > 3 && m_pBuffer[0] == (wchar_t)'\\' && m_pBuffer[1] == (wchar_t)'\\' )
- {
- if ( m_pBuffer[2] == (wchar_t)'?' )
- _snwprintf( pNewBuffer, nNewLen, L"%s", m_pBuffer );
- else
- _snwprintf( pNewBuffer, nNewLen, L"\\\\?\\UNC\\%s", m_pBuffer+2 );
- }
- else
- _snwprintf( pNewBuffer, nNewLen, L"\\\\?\\%s", m_pBuffer );
- bDirSet = SetCurrentDirectoryW( pNewBuffer );
+ _snwprintf( pNewBuffer, nNewLen, L"\\\\?\\%s", m_pBuffer );
+ bDirSet = SetCurrentDirectoryW( pNewBuffer );
- delete [] pNewBuffer;
- }
+ delete [] pNewBuffer;
}
else
bDirSet = SetCurrentDirectoryW( m_pBuffer );