From: James R. <si...@wa...> - 2007-11-15 14:38:40
|
From: poy=20 Sent: Thursday, November 15, 2007 2:00 PM To: Patches & development discussion=20 Subject: Re: [dcplusplus-devel] ValidateFileName problem on = Macintosh... i guess validateFileName() tries to keep the path, cleaning only = nested paths and bad chars. it might need to get re-written: no need to = look for "/./", "//", etc when all '/' have been cleared. Indeed; as itinerants has suggested, splitting it up would be a good = idea. It seems to me like there are two things going on here: a.. Filename sanitisation (remove invalid characters).=20 b.. Path sanitisation (remove unnecessary parts of paths). The URL -> filename case (e.g. for hub URLs) should be handled with the = filename sanitisation, provided that all the path separators are = included (I think including "\" and "/" in all cases would be good). = Other places would need to be checked. If no-one's done it before I get back home (Friday night), I'll probably = have a bash at doing a patch for this. --=20 James Ross |