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

Fix Pahts.IsInsideDir method when paths belongs to different drives/filesystem #20

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Apr 28, 2023

When comparing two paths from different drives like:

a := paths.New(`C:\AAA\BBB`)
b := paths.New(`D:\AAA\BBB\CCC`)
fmt.Println(b.IsInsideDir(a))

the function IsInsideDir returns an error instead of the correct result false.
See arduino/arduino-cli#2156 for a real-world use case.

@cmaglie cmaglie self-assigned this Apr 28, 2023
@cmaglie cmaglie added type: bug Perceived defect in any part of project priority: high Resolution is a high priority topic: code Related to content of the project itself labels Apr 28, 2023
@cmaglie cmaglie merged commit aa361d8 into master Apr 28, 2023
7 checks passed
@cmaglie cmaglie deleted the fix_isinsidedir branch April 28, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high Resolution is a high priority topic: code Related to content of the project itself type: bug Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants