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

File operations aren't Windows-friendly #345

Open
nex3 opened this issue Aug 17, 2019 · 0 comments
Open

File operations aren't Windows-friendly #345

nex3 opened this issue Aug 17, 2019 · 0 comments
Labels

Comments

@nex3
Copy link
Contributor

nex3 commented Aug 17, 2019

It looks like grinder_files.dart assumes that each platform has a single path separator that's used uniformly in all paths:

String get name {
int index = _path.lastIndexOf(_sep);
return index != -1 ? _path.substring(index + 1) : null;
}

This is not true on Windows, where \ and / may both be used as separators, including within the same path. This leads to bugs where, for example, the copy() function can incorrectly include the source file's directory name in the destination path.

I recommend using the path package rather than rolling custom path manipulation.

@devoncarew devoncarew added the bug label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants