Skip to content

[功能请求] 使用第三方文件资源管理器打开文件夹 #1168

@H1DDENADM1N

Description

@H1DDENADM1N

当前打开文件夹方法:

_openDirectory(filePath);

来自 open_dir

https://github.com/huynguyennovem/open_dir/blob/719a82257049a63ec68748c2a828aa1ba1b2c574/open_dir_windows/windows/open_dir_windows_plugin.cpp#L62

static bool OpenDir(const std::string& path, const std::string highlightedFileName = "") {
    std::wstring wpath = Utf8ToWide(path);
    
    HINSTANCE result;
    if (highlightedFileName.empty()) {
        result = ShellExecuteW(NULL, L"open", wpath.c_str(), NULL, NULL, SW_SHOW);
    } else {
        std::wstring wHighlightedFileName = Utf8ToWide(highlightedFileName);
        std::wstring wCommand = L"/select,\"" + wpath + L"\\" + wHighlightedFileName + L"\"";
        result = ShellExecuteW(NULL, L"open", L"explorer.exe", wCommand.c_str(), NULL, SW_SHOW);
    }
    return (result > reinterpret_cast<HINSTANCE>(32));
}

使用硬编码调用 explorer.exe 打开文件夹。


希望可以改为:

从注册表 HKEY_CLASSES_ROOT\Directory\shell\open\command 获取 打开文件夹方法 , 以支持 第三方文件资源管理器。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions