Index: src/libchengine/TLocalFilesystem.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r32e9c223239ddbe4055bf468e92efe33f90f5f94 --- src/libchengine/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision 32e9c223239ddbe4055bf468e92efe33f90f5f94) @@ -350,6 +350,16 @@ return pathInput; } + TSmartPath TLocalFilesystem::StripPathExtensionIfNeeded(const TSmartPath& pathInput) + { + const TSmartPath pathPrefix = PathFromString(L"\\\\?\\"); + + if(pathInput.StartsWith(pathPrefix)) + return PathFromString(pathInput.ToWString().Mid(pathPrefix.GetLength()).c_str()); + + return pathInput; + } + TLocalFilesystem::EPathsRelation TLocalFilesystem::GetPathsRelation(const TSmartPath& pathFirst, const TSmartPath& pathSecond) { if (pathFirst.IsEmpty()) Index: src/libchengine/TLocalFilesystem.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r32e9c223239ddbe4055bf468e92efe33f90f5f94 --- src/libchengine/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 32e9c223239ddbe4055bf468e92efe33f90f5f94) @@ -72,6 +72,7 @@ private: static chcore::TSmartPath PrependPathExtensionIfNeeded(const chcore::TSmartPath& pathInput); + static chcore::TSmartPath StripPathExtensionIfNeeded(const chcore::TSmartPath& pathInput); static UINT GetDriveData(const chcore::TSmartPath& spPath); DWORD GetPhysicalDiskNumber(wchar_t wchDrive); Index: src/libchengine/TLocalFilesystemFile.cpp =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r32e9c223239ddbe4055bf468e92efe33f90f5f94 --- src/libchengine/TLocalFilesystemFile.cpp (.../TLocalFilesystemFile.cpp) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/libchengine/TLocalFilesystemFile.cpp (.../TLocalFilesystemFile.cpp) (revision 32e9c223239ddbe4055bf468e92efe33f90f5f94) @@ -372,7 +372,7 @@ uli.HighPart = bhfi.nFileSizeHigh; uli.LowPart = bhfi.nFileSizeLow; - tFileInfo.SetFilePath(m_pathFile); + tFileInfo.SetFilePath(TLocalFilesystem::StripPathExtensionIfNeeded(m_pathFile)); tFileInfo.SetAttributes(bhfi.dwFileAttributes); tFileInfo.SetFileTimes(TFileTime(bhfi.ftCreationTime), TFileTime(bhfi.ftLastAccessTime), TFileTime(bhfi.ftLastWriteTime)); tFileInfo.SetLength64(uli.QuadPart); @@ -388,6 +388,6 @@ TSmartPath TLocalFilesystemFile::GetFilePath() const { - return m_pathFile; + return TLocalFilesystem::StripPathExtensionIfNeeded(m_pathFile); } }