microsoft/PowerToys

[Run] [VSCode] Recent workspaces does not show network paths

Open

#31,537 创建于 2024年2月22日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)C# (7,978 fork)batch import
Cost-SmallHelp WantedIssue-BugProduct-PowerToys RunRun-Plugin

仓库指标

Star
 (133,154 star)
PR 合并指标
 (平均合并 14天 20小时) (30 天内合并 117 个 PR)

描述

Microsoft PowerToys version

0.78.0

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

Note: no relevant logs from PowerToys Run were generated.

  1. Have a network share. Mine is //truenas.
  2. Open a folder in the network share with VS Code.
  3. Observe that it does not show up in PowerToys Run.
  4. Mount the network share to a path. Mine is W:/.
  5. Open a folder, this time from the mounted path.
  6. Observe that it shows up in PowerToys Run.

To get a list of opened paths, the plugin reads the state.vscdb sqlite file and looks for history.recentlyOpenedPathsList.
For reference, this is the history.recentlyOpenedPathsList in my state.vscdb file:

{
    "entries": [
        {
            "folderUri":"file:///w%3A/Projects/Vencord"
        },
        {
            "folderUri":"file://truenas/storage/Projects/website-frontend"
        }
    ]
}

And the PowerToys Run window: image

I think this stems from the way the VSCode plugin parses the URI path here, as regular system paths contain 3 slashes, but network paths only contain 2. https://github.com/microsoft/PowerToys/blob/fef50971af193a8c04c697022b6c7c880edcdc46/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/WorkspacesHelper/VSCodeWorkspacesApi.cs#L43-L47 though I don't know enough about URI parsing to be sure. EDIT: though there is a local check here, so it shouldn't get removed for non-local folders. Maybe it gets marked as local as I access it from a network location, but I also have it mounted to W:/?

I can't get PowerToys to compile, so I can't really test if this is the cause.

✔️ Expected Behavior

PowerToys Run VSCode Workspaces plugin shows recently opened folders if they are located on a network path.

❌ Actual Behavior

Folders from network paths do not show up at all.

Other Software

Visual Studio Code - Insiders: Version: 1.87.0-insider (system setup) Commit: a0b90ac5e04ea9a0733b68062253a469994e170e Date: 2024-02-22T05:48:26.543Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Windows_NT x64 10.0.22621

贡献者指南