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-12-02 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:58 +0300
commitc1f1243a70558e86e14b1ea09dc287737378894b (patch)
treef8b4f2fc0ee136bfb750fcb4050b6ea4ce044080 /CPP/7zip/UI/FileManager
parentb717a4dbfe15fd7540e68e6c5ccbe91901bbadba (diff)
4.624.62
Diffstat (limited to 'CPP/7zip/UI/FileManager')
-rwxr-xr-xCPP/7zip/UI/FileManager/PanelItemOpen.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
index ed8813c7..4d087a07 100755
--- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
+++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp
@@ -247,7 +247,7 @@ static HANDLE StartEditApplication(const UString &path, HWND window)
typedef BOOL (WINAPI * ShellExecuteExWP)(LPSHELLEXECUTEINFOW lpExecInfo);
#endif
-static HANDLE StartApplication(const UString &path, HWND window)
+static HANDLE StartApplication(const UString &dir, const UString &path, HWND window)
{
UINT32 result;
HANDLE hProcess;
@@ -261,7 +261,7 @@ static HANDLE StartApplication(const UString &path, HWND window)
execInfo.lpVerb = NULL;
execInfo.lpFile = path;
execInfo.lpParameters = NULL;
- execInfo.lpDirectory = NULL;
+ execInfo.lpDirectory = dir.IsEmpty() ? NULL : (LPCWSTR)dir;
execInfo.nShow = SW_SHOWNORMAL;
execInfo.hProcess = 0;
ShellExecuteExWP shellExecuteExW = (ShellExecuteExWP)
@@ -281,9 +281,10 @@ static HANDLE StartApplication(const UString &path, HWND window)
execInfo.hwnd = NULL;
execInfo.lpVerb = NULL;
const CSysString sysPath = GetSystemString(path);
+ const CSysString sysDir = GetSystemString(dir);
execInfo.lpFile = sysPath;
execInfo.lpParameters = NULL;
- execInfo.lpDirectory = NULL;
+ execInfo.lpDirectory = sysDir.IsEmpty() ? NULL : (LPCTSTR)sysDir;
execInfo.nShow = SW_SHOWNORMAL;
execInfo.hProcess = 0;
::ShellExecuteEx(&execInfo);
@@ -318,7 +319,7 @@ void CPanel::EditItem(int index)
void CPanel::OpenFolderExternal(int index)
{
- HANDLE hProcess = StartApplication(GetFsPath() + GetItemRelPath(index), (HWND)*this);
+ HANDLE hProcess = StartApplication(GetFsPath(), GetFsPath() + GetItemRelPath(index), (HWND)*this);
if (hProcess != 0)
::CloseHandle(hProcess);
}
@@ -354,7 +355,7 @@ void CPanel::OpenItem(int index, bool tryInternal, bool tryExternal)
{
// SetCurrentDirectory opens HANDLE to folder!!!
// NDirectory::MySetCurrentDirectory(_currentFolderPrefix);
- HANDLE hProcess = StartApplication(fullPath, (HWND)*this);
+ HANDLE hProcess = StartApplication(_currentFolderPrefix, fullPath, (HWND)*this);
if (hProcess != 0)
::CloseHandle(hProcess);
}
@@ -548,7 +549,7 @@ void CPanel::OpenItemInArchive(int index, bool tryInternal, bool tryExternal, bo
if (editMode)
hProcess = StartEditApplication(tempFilePath, (HWND)*this);
else
- hProcess = StartApplication(tempFilePath, (HWND)*this);
+ hProcess = StartApplication(tempDirNorm, tempFilePath, (HWND)*this);
if (hProcess == 0)
return;