From: Graham C. <g+o...@co...> - 2013-08-26 17:32:44
|
On 26/08/13 15:40, Mark Ellis wrote: > filesync-escape-name.diff > Replace non-reversible substitution of characters that aren't valid as > filenames, with uri escaping. The old scheme resulted in unnecessary uid > changes, and could have given collisions and duplications. I fairly strongly object to this change. I seem to remember, a very, very long time ago (probably in Armin's day) a discussion of this (on the mailing list, or in a bug report, I don't remember). I think the decision to use a non-reversible escape was made deliberately. The reason was to make the filenames as human-usable as possible. File-sync is not intended to be used for interchange (use a proper protocol!), it is intended to be convenient and easy for humans, who may exchange (.ics, etc) files with each other. By far the biggest problem is spaces. Spaces are allowed in all filesystems we target but not in URLs. They are also very common in the names of calendar and contact files. We really, really, really don't want to fill the user's directory up with %20's! The encoding has never been a problem in the real world. But, if the decision is that we should move to a reversible encoding then we need to use something a bit more clever. In that case, I suggest specifying a reserved_chars_allowed (to g_uri_escape_string) which includes at least space (probably " #$&(),", and possibly even "?!", although they are escaped today). By the way, other programs (like my OWASync), and indeed human beings, use different (also non-reversible) algorithms. These have always inter-worked successfully with OpenSync. I don't see the problem this is trying to fix. Graham |