diff --git a/reactos/base/shell/explorer/CMakeLists.txt b/reactos/base/shell/explorer/CMakeLists.txt index 6b5e525984b..80a0813d143 100644 --- a/reactos/base/shell/explorer/CMakeLists.txt +++ b/reactos/base/shell/explorer/CMakeLists.txt @@ -66,7 +66,7 @@ target_link_libraries(explorer wine uuid) -add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 notifyhook msvcrt kernel32 ntdll) +add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll) set_image_base(explorer 0x00400000) add_dependencies(explorer psdk) add_cd_file(TARGET explorer DESTINATION reactos FOR all) diff --git a/reactos/base/shell/explorer/explorer.cpp b/reactos/base/shell/explorer/explorer.cpp index 019ceea591c..d031cf76929 100644 --- a/reactos/base/shell/explorer/explorer.cpp +++ b/reactos/base/shell/explorer/explorer.cpp @@ -805,13 +805,33 @@ bool ExplorerCmd::EvaluateOption(LPCTSTR option) _mdi = true; else if (!_tcsicmp(option, TEXT("sdi"))) _mdi = false; + else if (!_tcsicmp(option, TEXT("n"))) + { + // Do nothing + } + else if (!_tcsicmp(option, TEXT("select"))) + { + SelectOpt = TRUE; + } else return false; + } else { if (!_path.empty()) return false; - _path = opt_str; + if((SelectOpt == TRUE) && (PathFileExists(option))) + { + WCHAR szDir[MAX_PATH]; + + _wsplitpath(option, szPath, szDir, NULL, NULL); + wcscat(szPath, szDir); + PathRemoveBackslash(szPath); + _path = szPath; + SelectOpt = FALSE; + } + else + _path = opt_str; } return true; diff --git a/reactos/base/shell/explorer/explorer.h b/reactos/base/shell/explorer/explorer.h index 24e19584441..839eeaec64b 100644 --- a/reactos/base/shell/explorer/explorer.h +++ b/reactos/base/shell/explorer/explorer.h @@ -110,6 +110,7 @@ struct ExplorerCmd bool IsValidPath() const; String _path; + WCHAR szPath[MAX_PATH]; int _flags; // OPEN_WINDOW_MODE int _cmdShow; bool _mdi; diff --git a/reactos/base/shell/explorer/precomp.h b/reactos/base/shell/explorer/precomp.h index 134d6f074d4..f6d290af7a0 100644 --- a/reactos/base/shell/explorer/precomp.h +++ b/reactos/base/shell/explorer/precomp.h @@ -29,6 +29,7 @@ #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1 #include +#include "shlwapi.h" #include "utility/utility.h"