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

Allow non-glob patterns with backslash on Windows #100

Merged
merged 7 commits into from Aug 23, 2019

Conversation

chrisblossom
Copy link
Contributor

@chrisblossom chrisblossom commented Jul 12, 2019

This PR reverts the breaking change in 5.0.0 not allowing windows to pass direct paths to del making del easier to use on windows.

Fixes #105

@sindresorhus
Copy link
Owner

Yeah, this is a good middle ground.

Can you update the readme: https://github.com/sindresorhus/del#api

@sindresorhus sindresorhus changed the title Allow windows non-glob patterns with \ on windows Allow non-glob patterns with backslash on Windows Aug 18, 2019
@chrisblossom
Copy link
Contributor Author

I removed the note regarding backward slashes (basically reverted the change 9e7550b). Is this what you wanted?

@sindresorhus
Copy link
Owner

I don't think we should remove the notes, as glob patterns do still need to only have forward slash. Just mention that normal file paths can have forward slashes.

@chrisblossom
Copy link
Contributor Author

Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use path.posix.join() instead of path.join().

How does that sound?

@sindresorhus
Copy link
Owner

Perfect. Can you fix the merge conflict?

@chrisblossom
Copy link
Contributor Author

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fail to delete when used with path.join on windows
2 participants