Skip to content

ParentDir and CurrentDir segments in the base aren't always correctly handled #8

@woody77

Description

@woody77

Once the loop hits this arm of the match, it will ignore any ParentDir segments in the base path:

for _ in itb {

The following fails:

let path = "some/path";
assert_eq!(pathdiff::diff_paths(path, "some/foo/baz/path"), PathBuf::from("../../../path"));

// this fails and returns "../../../../../path" instead.
assert_eq!(pathdiff::diff_paths(path, "some/foo/bar/../baz/path"), PathBuf::from("../../../path"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions