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

try to fix search file with ./ #45002

Closed
wants to merge 1 commit into from
Closed

Conversation

KignorChan
Copy link

I'm trying fix issue #26956, which can't find files starting with ./ on MacOS. I try to remove './' if it is found in search path. For example, to find 'controller.js' in current directory, if I input './controller.js', it will search like 'controller.js'. So I use "value.replace('./', '')" to remove './'.

@chrmarti
Copy link
Contributor

chrmarti commented Mar 5, 2018

Hi @KignorChan, thanks for your contribution!

Could you move the change to the openFileHandler that is call from the openAnythingHanlder, e.g. here: https://github.com/Microsoft/vscode/blob/6f57929bdb86c72619f36bc9e5537ca9528f1850/src/vs/workbench/parts/search/browser/openFileHandler.ts#L147

Also add a check for startsWith(value, '.' + paths.nativeSep) (use the strings module's startsWith) and then just remove the first two characters.

@roblourens roblourens closed this Oct 8, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants