From c904676cf4afdbe856d6dabee39427be868598cc Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Wed, 2 Mar 2016 18:29:34 +0100 Subject: [PATCH] Revert "Set CMDER_START to homeprofile" This reverts commit 728e83a85bea6ad7b4ddda0b960c443e3ef9f737. The problem with *always* setting CMDER_START is that this makes the `-new_console:d:%USERPROFILE%` in the conemu task definitions unnecessary, as this is now always overwritten as CMDER_START is set. This also means that a very visible conemu UI for setting the startup dir does not work anymore which might leave the user puzzled why. --- launcher/src/CmderLauncher.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 4982fd0..b2b0ffa 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -3,7 +3,6 @@ #include #include "resource.h" #include -#include #pragma comment(lib, "Shlwapi.lib") @@ -156,16 +155,7 @@ void StartCmder(std::wstring path, bool is_single_mode) } SetEnvironmentVariable(L"CMDER_ROOT", exeDir); - if (streqi(path.c_str(), L"")) - { - wchar_t* homeProfile = 0; - SHGetKnownFolderPath(FOLDERID_Profile, 0, NULL, &homeProfile); - if (!SetEnvironmentVariable(L"CMDER_START", homeProfile)) { - MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK); - } - CoTaskMemFree(static_cast(homeProfile)); - } - else + if (!streqi(path.c_str(), L"")) { if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) { MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);