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

Folders with a period in the title are treated like files, error is thrown #43

Open
ra-ryan opened this issue Aug 27, 2015 · 0 comments

Comments

@ra-ryan
Copy link

ra-ryan commented Aug 27, 2015

When running replace on a source target that contains a folder with a period in the title, the following error is thrown.

Warning: Unable to read "../testing/foo.bar" file (Error code: EISDIR). Use --force to continue.

In this case, foo.bar is a folder, not a file, but the script is attempting to open it as if it were a file.

I've found that the issue is caused by the way that grunt.file.expand is called and then iterated through in the replaceFileMultiple function. When I updated the grunt.file.expand call to include only files it fixes the issue. The updated line should look like this:

var sourceFiles = grunt.file.expand({'filter': 'isFile'}, settings.src);
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

No branches or pull requests

1 participant