back and forward slashes issue · Issue #40 · terkelg/tiny-glob · GitHub
Skip to content

back and forward slashes issue #40

Open

Description

@mnakalay

Hello,

In your description you say "Though Windows may use /, , or \ as path separators, you can only use forward-slashes (/) when specifying glob expressions. Any back-slashes () will be interpreted as escape characters instead of path separators."

Tests I ran suggest it should be the opposite. I am using Windows 7.

I wanted to list all files except some, so I used forward slashes as per your suggestion '!(**.jpg|css/style.css)'
This kept throwing an error and failing. When I modified it to use back-slashes instead '!(**.jpg|css\\style.css)' it worked flawlessly.

Activity

  1. terkelg commented on Feb 8, 2019

    @terkelg
    Owner

    Hi @mnakalay
    Thank you! I'll have a look at this. Could you be interested in doing a PR?

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions