Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find File: File Results have trailiing \ that prevents opening #55593

Closed
derekwallace opened this issue Aug 1, 2018 · 19 comments
Closed

Find File: File Results have trailiing \ that prevents opening #55593

derekwallace opened this issue Aug 1, 2018 · 19 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded
Milestone

Comments

@derekwallace
Copy link

derekwallace commented Aug 1, 2018

  • VSCode Version: latest Insiders
  • OS Version: Windows 10

This has started to happen.
Ctrl - P
The files names as presented have a trailin \.
therefore they dont open .

image

@vscodebot vscodebot bot added the insiders label Aug 1, 2018
@isidorn
Copy link
Contributor

isidorn commented Aug 2, 2018

I do not see what is the issue here. Can you please expain?
Can you reproduce with latest vscode insiders https://code.visualstudio.com/insiders/

@isidorn isidorn added the info-needed Issue requires more information from poster label Aug 2, 2018
@derekwallace
Copy link
Author

The issue is that the files dont open becuase something is wrong with the stored path .

image

The file doesnt open. this used to work fine upto about 3 days ago.

image

@isidorn
Copy link
Contributor

isidorn commented Aug 2, 2018

Can you reproduce with latest vscode insiders?

@derekwallace
Copy link
Author

yes. using it now. same issue.
very frustrating.

@isidorn
Copy link
Contributor

isidorn commented Aug 3, 2018

Might this be connected with the workspace refactoring you did @aeschli @sandy081
My uri display work only affect what we display, not how we open
fyi @bpasero

@isidorn isidorn removed the info-needed Issue requires more information from poster label Aug 3, 2018
@aeschli
Copy link
Contributor

aeschli commented Aug 3, 2018

@derekwallace Is there anything special about the P: drive? How did you open code and that folder?

@derekwallace
Copy link
Author

Nothing special. It's a network disk. Have been using it for the same vscode workspace for about 7 months. Vscode installed on c: on local machine.
Open insiders and it auto opens the last workspace.

@derekwallace
Copy link
Author

the title is possible slightly misleading. In the image above the cbs.tcl file in the file results seciton, has the path set to \
This is not correct as its windows. normally they are relative paths fromt the root of the workspace.
But this may just be a rendering issue.
In the 2nd image the path looks correct, but it says the file does not exist. but it does and the "file results" is form Code finding the file....

@aeschli
Copy link
Contributor

aeschli commented Aug 6, 2018

You're mentioning that it's a workspace. Can you paste the .code-workspace file here?
If you opened vscode on a single folder, can you attach the %AppData%\Roaming\Code - Insiders\storage.json file?

What's really strange is the URI in the error dialog file://\P:\perforce_playground\. I wonder how the backspaces got in there. When we create an URI out of a path all \ are turned into /.

@derekwallace
Copy link
Author

its a workspace. pasting here.

`{
   "folders": [
      {
         "path": "P:\\perforce_Playground\\derekw_de02-1777_rce_dev"
      },
   ],

   "settings": {
      // trying to exclude some folders
      // ** means any path under tree
      "files.useExperimentalFileWatcher": true,
      "files.exclude" : {
         ".archive/**" : true,
         ".logarchive/**": true,
         "docs/**": true,
         "**/third_party/**": false,
         "**/thirdparty/**": true,
         "**/venv/**": true,
         "**/__pycache__/**": true,
         "tools/pals/test/src/**": true,
         "training/**": true,
         "**/palsref/**": true
      },

      "python.linting.enabled": false,
      "python.linting.pylintEnabled": true,
      "python.linting.ignorePatterns": [
         ".vscode/*.py",
         "**/site-packages/**/*.py",
         "**/third_party/**/*.py"
      ],
      "python.envFile": "${workspaceFolder}/.env",
      // "python.pythonPath": "C:\\Users\\derekw\\AppData\\Local\\Programs\\Python\\Python36\\python.exe",
      "python.workspaceSymbols.enabled": false,

      // this seems to work it means intellisense is aware of modules in these locations
      // and you can go to defintion etc.
      "python.autoComplete.extraPaths": [
         "P:\\perforce_Playground\\derekw_de02-1777_rce_dev\\tools\\python_lib",
         "P:\\perforce_Playground\\derekw_de02-1777_rce_dev\\tools\\iccr\\bin\\",
         "P:\\perforce_Playground\\derekw_de02-1777_rce_dev\\tools\\iipregr\\bin\\",
         "P:\\perforce_Playground\\derekw_de02-1777_rce_dev\\tools\\vividc\\bin\\",
         "P:\\perforce_Playground\\derekw_de02-1777_rce_dev\\tools\\python_lib\\venv\\lib\\python3.5\\site-packages\\",
      ],

      "python.workspaceSymbols.exclusionPatterns": [
         "**/site-packages/**",
         "**/third_party/**",
         "**/venv/**",
         "**/thirdparty/**",
         "**/.archive/**",
         "**/__pycache__/**",
         "**/auxiliary_scripts/**",
         "docs/**",
         "training/**",
         "**/palsref/**"
      ],

      // Try and get Ctrl-P to find any files in workspace
      "search.useRipgrep": true,
      "search.useIgnoreFiles": false,
      "search.exclude": {
         "**/__pycache__/**": true,
         "**/third_party/**": true,
         "**/venv/**": true,
         "**/thirdparty/**": true,
         "tools/pals/test/src/**": true,
         "auxiliary_scripts/**" :true,
         "docs/**" :true,
         "training/**": true,
         "**/palsref/**": true
      },
      "searchRipgrep.enable": true,




      // Indexing to find files. Ive confirmed
      "folder-indexing.exclude": [
         "*\\bin\\*",
         "*\\obj\\*",
         "*\\.svn\\*",
         "*\\.git\\*",
         "*\\__pycache__\\*",
         "*\\.archive\\*",
         "*\\.log_archive\\*",
         "*\\third_party\\*",
         "*\\venv\\*",
         "*\\thirdparty\\*",
         "*\\common\\*",
         "*\\docs\\*",
         "*.dll",
         "*.exe",
         "*\\auxiliary_scripts\\*",
         "*\\training\\*",
         "*\\palsref\\*"
      ],

   }

}
`

@derekwallace
Copy link
Author

opening the same workspace in 1.25.1 VSCode does not have the issue.

image

@aeschli
Copy link
Contributor

aeschli commented Aug 7, 2018

@derekwallace The problem is in the experimental search ripgrep extension. You have to remove "searchRipgrep.enable": true from the settings in the .code-workspace file.

@aeschli
Copy link
Contributor

aeschli commented Aug 7, 2018

@roblourens The URLs that come back from the experimental fileIndexProvider contain backward slashes. The problem is here. Using URI.with is risky. We need to go through our code to look for similar usages.

@aeschli aeschli assigned roblourens and unassigned aeschli and sandy081 Aug 7, 2018
@aeschli aeschli added the candidate Issue identified as probable candidate for fixing in the next release label Aug 7, 2018
@aeschli aeschli added this to the July 2018 milestone Aug 7, 2018
@aeschli
Copy link
Contributor

aeschli commented Aug 7, 2018

Adding the candidate flag as the fix is simple. It's an experimental feature, but it seems it used to work.

@joaomoreno joaomoreno changed the title Find File: FIle Results have trailiing \ that prevents opening Find File: File Results have trailiing \ that prevents opening Aug 7, 2018
@derekwallace
Copy link
Author

confirming that setting searchRipgrep.enable : false fixes issue in insiders.
note that the same setting in the production version works fine.

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Aug 7, 2018
@roblourens
Copy link
Member

What's wrong with URI.with? What's the actual fix? I can repro but I'm still setting up to debug it.

Also, this was filed a week ago, please assign or at least mention me in search issues!

@roblourens
Copy link
Member

Oh, it's not URI.with, it's path.join vs paths.join where this came from in resources.ts

roblourens added a commit that referenced this issue Aug 7, 2018
@roblourens
Copy link
Member

Since this code is just working with file paths and file folders, it's safe to use fsPath and Uri.file

@aeschli
Copy link
Contributor

aeschli commented Aug 7, 2018

@roblourens Sorry Rob for the late notice, I thought this was related to the changes that I and @sandy081 made on using URI's for workspace folders. I wasn't able to reproduce until today with @bpasero's help.

@chrmarti chrmarti added the verified Verification succeeded label Aug 8, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants