-
Notifications
You must be signed in to change notification settings - Fork 118
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
Accomodate filenames containing spaces in a DCC transfer. #157
base: master
Are you sure you want to change the base?
Conversation
For compatibility with clients that don't support quotes, perhaps only add the quotes when strictly necessary? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comment.
Which client doesn't support quotes? Adding an extra check sounds unnecessary if it is just about quoting a file. |
How do you know all clients support quotes? There may be some out there that don't, it's hard to know for sure. Clients clearly have to support lack of quotes as well, or bitlbee wouldn't work with them today. |
Apologies for the delayed response. I'm willing to make the change - just not quite sure how to go about it... |
Given the number of clients out there, I think that's almost impossible to test with certainty. Which is why I'd rather be conservative about changing this behaviour by only sending quotes when we need to (because the filename e.g. contains spaces). That means that if a client doesn't support double quotes, at least we only break them when they send files with spaces in the name. Also, please escape e.g. quotes when quoting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See earlier comments
Many (most?) IRC clients accomodate receiving files that contain spaces in their names by having quotes surround the file name.
This quick fix allows bitlbee to handle that case.
An alternative implementation option would be to allow selecting either quotes surrounding the filename, or replacing all spaces in the offered file name using underbar characters.
File names containing quotes should probably receive additional processing, in order to ensure the quotes internal to the filename are properly escaped.
This patch, however, allows me to exchange files containing spaces in the names with a colleague who uses XMPP via Adium, with my client being a combination of bitlbee and ERC (under emacs).