microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.68k forks source link

Search does not exclude absolute path #204134

Closed lamyergeier closed 6 months ago

lamyergeier commented 7 months ago

Does this issue occur when all extensions are disabled?: Yes/No

Note

Steps to Reproduce:

{
  "folders": [
    {
      "path": "/mnt/Documents/Git"
    },
    {
      "name": "Git - Mobile",
      "path": "/mnt/Documents/Mobile/Git"
    },
    {
      "name": "Opt",
      "path": "/mnt/Data/opt"
    },
    {
      "path": "/mnt/Documents/Mobile/Software/Data/Common/Task"
    },
    {
      "path": "/mnt/Documents/Mobile/Desktop"
    },
    {
      "name": "BrowserSession",
      "path": "/mnt/Documents/Mobile/Software/Data/Common/Task/BrowserSession"
    }
  ],
  "settings": {
    "files.exclude": {
      "**/_config.yml": true,
      "**/.Archive/": true,
      "**/.Backup/": true,
      "**/.clang-format": true,
      "**/.Commit/": true,
      "**/.editorconfig": true,
      "**/.gitignore": true,
      "**/.gitlab-ci.yml": true,
      "**/.gitmessage": true,
      "**/.gitmodules": true,
      "**/.GitSettings/": true,
      "**/.huskyrc": true,
      "**/.lintstagedrc": true,
      "**/.prettierignore": true,
      "**/.Rendered/": true,
      "**/.Tag/": true,
      "**/.trash/": true,
      "**/.vscode/": true,
      "**/.Ws/": true,
      "**/*.code-workspace": true,
      "**/*.temp": true,
      "**/Bin/": true,
      "**/bin/": true,
      "**/CHANGELOG.md": true,
      "**/commitlint.config.js": true,
      "**/Image/": true,
      "**/LICENSE": true,
      "**/LocateDatabase.gen.db": true,
      "**/Media/": true,
      "**/Note/": true,
      "**/Output/": true,
      "**/package-lock.json": true,
      "**/package.json": true,
      "**/README.md": true,
      "**/Readme/": true,
      "**/Test/": true
    }
  }

image


Note: I am facing same issue in file search (that uses fzf)

VSCodeTriageBot commented 7 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.86.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

lamyergeier commented 7 months ago

@andreamah What should I do?

In the following image we can see that LaptopGit is excluded in config settings (see editor), but the search is still showing the search in the right pane. Also, please note that "search.followSymlinks": false is set, and LaptopGit is a symlink (under Workspace folder with name Git - Mobile - see original post for workspace file) but it is still showing!

image

andreamah commented 6 months ago

Are these files open in your editor?

lamyergeier commented 6 months ago

@andreamah (see highlighted text in the below images)

I closed everything except the config file as you can see in the below screenshot, and we can see that I am still facing the problem as described above

Also /home/lamy/opt is symlinked to target /mnt/Data/opt, so I included both of it below but I am still facing the problem!

$ realpath /home/lamy/opt
/mnt/Data/opt

image

lamyergeier commented 6 months ago

@andreamah Please let me know if this is not a priority. I would better close this if its not an important issue! @VSCodeTriageBot

andreamah commented 6 months ago

We do not support absolute file paths for search.excludes, and this also applies for files.exclude. We try to match the behavior there. Please see the discussion about this here https://github.com/microsoft/vscode/issues/70438