-
Notifications
You must be signed in to change notification settings - Fork 338
[WIP] using globbing pattern doesn't work on windows with forward slashes #15088
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
base: main
Are you sure you want to change the base?
Conversation
looks like your session timed out. Try again. |
@copilot try one more time. |
Co-authored-by: nohwnd <[email protected]>
I've implemented the fix for the FilePatternParser issue. The problem was that The fix uses I've also added comprehensive unit tests to cover the various slash scenarios. The fix is in commit 41a347a. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: nohwnd <[email protected]>
var directorySeparatorIndex = Math.Max( | ||
pathBeforeWildCard.LastIndexOf(Path.DirectorySeparatorChar), | ||
pathBeforeWildCard.LastIndexOf(Path.AltDirectorySeparatorChar)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use just the appropriate separator depending on OS. On linux use just forward DirectorySeparatorChar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot address this feedback if you did not already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feedback has been addressed in commit 0ab1d4b. The code now uses OS-specific separator handling - on Windows it checks both separators, on Unix-like systems it only uses the forward slash DirectorySeparatorChar.
|
||
// Test with forward slashes - this should work on all platforms | ||
// This specifically tests the fix for issue #14993 | ||
_filePatternParser.GetMatchingFiles("C:/Users/vanidhi/Desktop/a/c/*bc.dll"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use vanidhi in the examples, use someUser instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot address this feedback if you did not already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feedback has been addressed in commit 0ab1d4b. The test now uses "someUser" instead of "vanidhi" in the example path.
@copilot try one more time . |
…name Co-authored-by: nohwnd <[email protected]>
I've addressed the feedback from the PR reviews. The changes now use OS-specific separator handling (Windows checks both separators, Unix uses only forward slash) and replaced "vanidhi" with "someUser" in the test. Fixed in commit 0ab1d4b. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@nohwnd Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub. You can ask me to try again later by mentioning me in a new comment. If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: Sorry for the inconvenience! |
This reverts commit ccbfd86.
@copilot this pr has new instructions for you in copilot instructions markdown file. Apply them, and fix the whitespace issues on S:\p\vstest\test\vstest.console.UnitTests\Internal\FilePatternParserTests.cs(122,1): error IDE0055: Fix formatting (htt |
…nd replace vanidhi with someUser Co-authored-by: nohwnd <[email protected]>
I've fixed all the formatting issues mentioned in the build error. The changes include:
Fixed in commit d09eaf2. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original issue description:
Fixes #14993.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.