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

Exlusion for fixjsstyle-script.py does not work correct on Windows OS #71

Open
GoogleCodeExporter opened this issue Mar 31, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. when using scripts\fixjsstyle-script.py script
2. I try to exclude some files and folders by using:
   -e editor -x jquery,.min.js,iscroll-lite.js

What is the expected output? What do you see instead?
I expect that these files would be excluded from fixing.
However the files are not 

What version of the product are you using? On what operating system?
2.3.5

Please provide any additional information below.

I fixed it by changing the line 155 in simplefileflags.py making it more 
exhaustive:
if f.endswith('/' + exclude) or f.endswith(exclude) or exclude in f or f == 
exclude:

The initial code based on ('/' + exclude) DOES NOT WORK ON WINDOWS as the 
Windows paths should be ('\\' + exclude).

(I'm not a Python developer, so I think the exclusion code can be simpler.)

My suggestion would be not only to exclude a specific resource but also to 
accept "*" exclusion patterns, not only the specified file. 

This would make it more flexible.

Original issue reported on code.google.com by [email protected] on 16 Jul 2013 at 8:44

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

No branches or pull requests

1 participant