+ private static final boolean operatingSystemIsWindows() { // TODO: Move
to the proper class
+ try {
+ return
System.getProperty("os.name").toLowerCase().indexOf("win") >= 0;
+ } catch(Throwable t) {
+ return true; // :)
+ }
+ }
IMHO this is dodgy, other OSs might have "win" in them. Normally we just check
if File.separator is "\".
I am not convinced that the rest of the change is a good idea. For example
allowing HTML markup in filenames might combine with sloppy code to cause
problems. Allowing % in url's might again cause issues. Allowing pipes, <>, and
spaces might cause problems with filenames copied to a shell. I guess it should
depend on the configuration i.e. how paranoid the user is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20100217/161cc5fb/attachment.pgp>