# HG changeset patch # User thomas_-_s # Date 1248705613 0 # Node ID 56a36f63343145ce3273c486d1276cf676e81b90 # Parent afe3d40fbc5c99c22ded891dc34d32e957bf72df Differ between UNICODE and none UNICODE variant if trying the get the short notation windows path name. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@984 59b1889a-e5ac-428c-b0c7-476e01d41282 diff -r afe3d40fbc5c -r 56a36f633431 src/IndentHandler.cpp --- a/src/IndentHandler.cpp Thu Jul 16 11:59:57 2009 +0000 +++ b/src/IndentHandler.cpp Mon Jul 27 14:40:13 2009 +0000 @@ -457,9 +457,15 @@ // If the short path could be retrieved, create a correct sized buffer, store the // short path in it and convert all back to QString. if ( length != 0 ) { +#ifdef UNICODE buffer = new WCHAR[length]; length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, buffer, length); tempDirctoryStrHelper = QString::fromWCharArray( buffer ); +#else + buffer = new TCHAR[length]; + length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, buffer, length); + tempDirctoryStrHelper = buffer; +#endif tempDirctoryStr = QDir::fromNativeSeparators(tempDirctoryStrHelper).replace("//", "/"); delete buffer;