Skip to content

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

Open

Description

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.

// Remove preceding '/' from local (Windows) path
if (workspaceEnv == WorkspaceEnvironment.Local)
{
path = path[1..];
}

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Cost-SmallSmall work item - 0-8 hours of workHelp WantedWe encourage anyone to jump in on these and submit a PR.Issue-BugSomething isn't workingProduct-PowerToys RunImproved app launch PT Run (Win+R) WindowRun-PluginThings that relate with PowerToys Run's plugin interface

    Type

    No type

    Projects

    • Status

      ⚠️Needs Walkthrough

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions