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:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-08-19 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:57 +0300
commitc10e6b16f6d5484ed896b2c614cb7fb77f336d24 (patch)
treef7a2ac132f883d95c2cf28ab01d58963de1ee811 /CPP/7zip/UI/GUI
parent173c07e166fdf6fcd20f18ea73008f1b628945df (diff)
4.60 beta
Diffstat (limited to 'CPP/7zip/UI/GUI')
-rwxr-xr-xCPP/7zip/UI/GUI/CompressDialog.cpp4
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateCallbackGUI.cpp8
-rwxr-xr-xCPP/7zip/UI/GUI/UpdateGUI.cpp2
3 files changed, 5 insertions, 9 deletions
diff --git a/CPP/7zip/UI/GUI/CompressDialog.cpp b/CPP/7zip/UI/GUI/CompressDialog.cpp
index 9634ba02..468c87c8 100755
--- a/CPP/7zip/UI/GUI/CompressDialog.cpp
+++ b/CPP/7zip/UI/GUI/CompressDialog.cpp
@@ -426,7 +426,7 @@ void CCompressDialog::OnButtonSFX()
UString fileName;
m_ArchivePath.GetText(fileName);
int dotPos = fileName.ReverseFind(L'.');
- int slashPos = fileName.ReverseFind(L'\\');
+ int slashPos = fileName.ReverseFind(WCHAR_PATH_SEPARATOR);
if (dotPos < 0 || dotPos <= slashPos)
dotPos = -1;
bool isSFX = IsSFX();
@@ -707,7 +707,7 @@ void CCompressDialog::SetArchiveName(const UString &name)
if (!Info.KeepName)
{
int dotPos = fileName.ReverseFind('.');
- int slashPos = MyMax(fileName.ReverseFind('\\'), fileName.ReverseFind('/'));
+ int slashPos = MyMax(fileName.ReverseFind(WCHAR_PATH_SEPARATOR), fileName.ReverseFind('/'));
if (dotPos >= 0 && dotPos > slashPos + 1)
fileName = fileName.Left(dotPos);
}
diff --git a/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
index 7cd5df95..8d63ee58 100755
--- a/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
+++ b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp
@@ -167,9 +167,7 @@ HRESULT CUpdateCallbackGUI::CryptoGetTextPassword2(Int32 *passwordIsDefined, BST
}
}
*passwordIsDefined = BoolToInt(PasswordIsDefined);
- CMyComBSTR tempName(Password);
- *password = tempName.Detach();
- return S_OK;
+ return StringToBstr(Password, password);
}
/*
@@ -211,9 +209,7 @@ HRESULT CUpdateCallbackGUI::Open_CryptoGetTextPassword(BSTR *password)
Password = dialog.Password;
PasswordIsDefined = true;
}
- CMyComBSTR tempName(Password);
- *password = tempName.Detach();
- return S_OK;
+ return StringToBstr(Password, password);
}
HRESULT CUpdateCallbackGUI::Open_GetPasswordIfAny(UString &password)
diff --git a/CPP/7zip/UI/GUI/UpdateGUI.cpp b/CPP/7zip/UI/GUI/UpdateGUI.cpp
index 16edc718..ef9a2d70 100755
--- a/CPP/7zip/UI/GUI/UpdateGUI.cpp
+++ b/CPP/7zip/UI/GUI/UpdateGUI.cpp
@@ -239,7 +239,7 @@ static HRESULT ShowDialog(
for (int i = 0; i < item.PathParts.Size(); i++)
{
if (i > 0)
- name += L'\\';
+ name += WCHAR_PATH_SEPARATOR;
name += item.PathParts[i];
}
if (NFind::FindFile(name, fileInfo))