On Thursday 18 February 2010 19:46:05 Matthew Toseland wrote:
> > > we can at least try to avoid making the problem any worse.
> >
> > I agree that we need re-inserts to work. It was one of my goals with the
> > new sanitizer: The old one removed very common characters such as
> > brackets. And as it is only being used when downloading files and not
> > when inserting them, people who have downloaded an affected file could
> > not reinsert it without renaming (which nobody will do).
> >
> > However, we cannot have a strict list of forbidden characters which is
> > applied for all operating systems because some OS forbid very common and
> > useful characters: Windows for example does not allow the question mark
> > "?" in filenames. This sucks. What would be acceptable is to have a
> > config option "Remove problematic characters from filenames when
> > downloading and uploading files" and have it enabled by default. This
> > should as the name says also change the current behavior to also sanitize
> > filenames before uploading.
>
> As I understand it your code does not remove : ? etc on Windows, it only
> removes stuff that cannot be represented in ISO-8859-1 or UTF-8 or whatever
> the default is.

Of course it does:

"if(onWindowsOS && 
StringValidityChecker.isWindowsReservedFilenameCharacter(c))
                                sb.append(' ');"


(windowsReservedFilenameCharacters = new HashSet<Character>(Arrays.asList(
                        new Character[] { '/', '\\', '?', '%', '*', ':', '|', 
'\"', '<', '>'}));

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20100219/3782ec78/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20100219/3782ec78/attachment.pgp>

Reply via email to