Do not add quotes for input filename, breaks plenty of file paths#87
Open
anselanza wants to merge 2 commits intodamianociarla:masterfrom
Open
Do not add quotes for input filename, breaks plenty of file paths#87anselanza wants to merge 2 commits intodamianociarla:masterfrom
anselanza wants to merge 2 commits intodamianociarla:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per #78 there are problems whenever spaces (and probably many other characters) are used in filenames. I don't see the need to "add quotes" for file paths, particularly if these are coming from a properly-formed string as would be the case with
path.resolve("./some/folder/file with spaces etc.mp4".In any case, the
utils.addQuotesfunction currently usesJSON.stringifywhich is surely not intended for this use case. We don't want JSON, we want a path to pass to the command line.I don't have access Windows machine now so I can't test whether this breaks anything on Windows, but I would assume
path.resolveshould give a perfectly valid filename path as a string, too.