-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update convert.py #1026
Update convert.py #1026
Conversation
crudely fix quoting in windows
Thanks for the contribution! This is clearly a bug. What about filenames that contain single quotes? (This is why we're bothering with a full escape of the string.) Maybe we'd be better off not using shell quoting or string templating at all—just using those |
Thanks for taking a look! In Windows, filenames with single quotes would work as long as the double quotes are surrounding the entire thing. I was able to convert files containing a single quote using this code. |
Double quotes should work in *nix as well, right? What if you just used a regex to replace double quotes with |
Scratch that...using double quotes might cause variables to be interpreted in *nix systems without further escaping |
Ah, perhaps I should have asked: what if the filename has a double quote in it? 😃 This is why shell escaping is a debacle best avoided if possible... |
I got this to mostly work using |
Weird! Thanks for looking into this. I think the most straightforward (and most reliable) solution will be to pass the command to
Simple! Interested in tackling this, @mluds? |
The only problem is with the |
I'm not too worried about the |
Merged! Can you check whether I messed anything up, @mluds, or if this now works on Windows? |
Oops, forgot to mention it didn't pass the Travis CI build! I'll work on that now. |
Never mind, it looks like you got to it and it's working. Thanks! |
fix quoting in windows