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

Doesn't escape src option #43

Closed
drgroot opened this issue Mar 31, 2016 · 5 comments
Closed

Doesn't escape src option #43

drgroot opened this issue Mar 31, 2016 · 5 comments

Comments

@drgroot
Copy link

drgroot commented Mar 31, 2016

Setting the ssh setting to true, I noticed it does not escape the value of src

src: 'user@server:/abs_path/Vader 018 (2016).cbr'

even when i tried wrapping src in double quotes ' "<value>" ', I still seem to be getting this error

[Error: rsync exited with code 12]
bash: -c: line 0: syntax error near unexpected token `('
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [Receiver=3.1.1]
@jedrichards
Copy link
Owner

Uh, ok. Have you tried escaping the spaces with a backslash?

src: 'user@server:/abs_path/Vader\ 018\ (2016).cbr'

@drgroot
Copy link
Author

drgroot commented Mar 31, 2016

yea i used

options.src = options.src.replace(/ /g,"\\ ")

to escape scapes

didn't work.

[Error: rsync exited with code 2]
/bin/sh: -c: line 0: syntax error near unexpected token `('

@jedrichards
Copy link
Owner

I'm not sure what's going on. It's strange that nobody else has had problems with spaces in paths up to now.

I'll try and get around to reproducing this in a failing test. In the meantime please report back anything else you find out here ...

@drgroot
Copy link
Author

drgroot commented Apr 1, 2016

my current fix is just to replace with *. its kinda hackish, and not the greatest

options.src = options.src.replace(/\s+/g, '*')

this works for me. but its not the greatest solution

to add onto that, I also have to do this for other characters such as semicolons.

@jedrichards
Copy link
Owner

jedrichards commented Aug 29, 2016

Hello! Sorry for the delay ... just merged a contribution related to this. Does it help with your issue? #47

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

2 participants