Restricting $ in file names

As of version 0.703, DC++ is able to share files containing “$” in their name. This is (obviously) because that restriction was removed. It was removed because it’s completely irrelevant at this time; DC++ will only use TTHs to request files. As such, it doesn’t matter if the file name is written in a special way (except maybe how it should be stored on the end computer, but that’s a different matter) when it comes to downloading.

All of this is now fine, but why wasn’t it previusly fine to share those types of files? Actually, this isn’t a restriction that has been set because the NMDC protocol didn’t support it; This is an artificial restriction in DC++. (Most likely because of its initial coding.)

You see, the NMDC GET command do require a $ in the command (besides in the beginning), but it’s not something a client couldn’t work around.

The command NMDC use is “$Get $|”. If the client start to search from the beginning (after “$Get”) after the $ to find the offset, a file name containing a $ will obviously break/behave unexpectadly. However, if the client would search backwards from the first |, it would be able to catch the correct offset and file name, even if the file name contain a $.

(Yes, of course, we still have a restriction for “|” in the GET and a file’s name.)

Note: I don’t know if DC++ has fixed this kind of behaviour for other commands still in operation in DC++.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: