Skip to content

isWithin has surprising behavior when base ends with /. and child starts with . #537

Open
@sigurdm

Description

@sigurdm
import 'package:path/path.dart';

void main(List<String> args) {
  print(isWithin('/dir/.', '/dir/.file'));
  print(isWithin('/dir/.', '/dir/file'));
}

Prints

> dart a.dart
false
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    package:pathtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions