Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/Far/OverwriteDialogFar.cpp')
-rw-r--r--CPP/7zip/UI/Far/OverwriteDialogFar.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/CPP/7zip/UI/Far/OverwriteDialogFar.cpp b/CPP/7zip/UI/Far/OverwriteDialogFar.cpp
index a7fb495e..e950f695 100644
--- a/CPP/7zip/UI/Far/OverwriteDialogFar.cpp
+++ b/CPP/7zip/UI/Far/OverwriteDialogFar.cpp
@@ -68,8 +68,17 @@ NResult::EEnum Execute(const CFileInfo &oldFileInfo, const CFileInfo &newFileInf
SetFileInfoStrings(oldFileInfo, oldFileInfoStrings);
SetFileInfoStrings(newFileInfo, newFileInfoStrings);
- AString oldName = UnicodeStringToMultiByte(oldFileInfo.Name, CP_OEMCP);
- AString newName = UnicodeStringToMultiByte(newFileInfo.Name, CP_OEMCP);
+ UString oldName2 = oldFileInfo.Name;
+ UString newName2 = newFileInfo.Name;
+
+ {
+ const unsigned maxNameLen = kXSize - 9 - 2;
+ ReduceString(oldName2, maxNameLen);
+ ReduceString(newName2, maxNameLen);
+ }
+
+ AString oldName = UnicodeStringToMultiByte(oldName2);
+ AString newName = UnicodeStringToMultiByte(newName2);
struct CInitDialogItem initItems[]={
{ DI_DOUBLEBOX, 3, 1, kXSize - 4, kYSize - 2, false, false, 0, false, NMessageID::kOverwriteTitle, NULL, NULL },