diff options
Diffstat (limited to '7zip/UI/Explorer/ContextMenu.cpp')
-rwxr-xr-x | 7zip/UI/Explorer/ContextMenu.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/7zip/UI/Explorer/ContextMenu.cpp b/7zip/UI/Explorer/ContextMenu.cpp index 7af6e138..fdb62212 100755 --- a/7zip/UI/Explorer/ContextMenu.cpp +++ b/7zip/UI/Explorer/ContextMenu.cpp @@ -246,14 +246,12 @@ static bool MyInsertMenu(CMenu &menu, int pos, UINT id, const UString &s) static UString GetSubFolderNameForExtract(const UString &archiveName) { - int dotPos = archiveName.ReverseFind('.'); - if (dotPos >= 0) - { - UString res = archiveName.Left(dotPos); - res.TrimRight(); - return res; - } - return archiveName + UString(L"~"); + int dotPos = archiveName.ReverseFind(L'.'); + if (dotPos < 0) + return archiveName + UString(L"~"); + UString res = archiveName.Left(dotPos); + res.TrimRight(); + return res; } static UString GetReducedString(const UString &s) |