Skip to content

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

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"));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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