cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: Bug in MultipartParser?
Date Fri, 20 Sep 2002 12:37:15 GMT
Vadim Gritsenko wrote:

> +            String fileName = (String) headers.get("filename");
> +            if(File.separatorChar == '\\')
> +                fileName = fileName.replace('/','\\');
> +            else
> +                fileName = fileName.replace('\\','/');

Looks like it should work most of the time. I'm afraid that it doesn't 
cover pathological cases like having a Unix file with an \ embedded in 
the filename sent to a Windows machine, or some bizarre OS where path 
separators are maybe colons or dots. OTOH I'm afraid it's not possible 
to devise a solution that works 100% of the time.

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message