Ugo Cei wrote: > 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.
Worst case result is wrongly named file, which is hardly important, especially when taking in account automatic renaming of duplicate names. In any case, does it work? If yes, I can commit... Vadim > Ugo --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]