This commit is contained in:
Igor Pavlov
2015-12-31 00:00:00 +00:00
committed by Kornel Lesiński
parent 5de23c1deb
commit 9608215ad8
73 changed files with 1854 additions and 783 deletions

View File

@@ -448,7 +448,7 @@ int PrintErrorMessage(const char *message, const char *text)
}
static void ReduceString(UString &s, unsigned size)
void ReduceString(UString &s, unsigned size)
{
if (s.Len() > size)
{

View File

@@ -190,6 +190,8 @@ int ShowLastErrorMessage();
bool WasEscPressed();
void ReduceString(UString &s, unsigned size);
}
#endif

View File

@@ -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 },