Thanks! That was the first thing I did, before I saw
Files.filename(). I figured the latter would save me unnecessary
object creation, though admittedly the java.io.File solution is
probably more robust (I haven't looked at the source for File yet to
compare the two).
On Feb 20, 2008, at 5:36 PM, Peter Ertl wrote:
Why not simply use
new java.io.File(client_file_name).getName() ?
> Returns the name of the file or directory denoted by this abstract
pathname.
> This is just the last name in the pathname's name sequence.
> If the pathname's name sequence is empty, then the empty string is
returned.
Am 20.02.2008 um 22:03 schrieb Alex Jacoby:
Good points -- I was munging the filename a bit, but basically
leaving it unchanged so that it would be simpler to debug.
I'm still curious about the directory traversal thing... I've tried
using tamper data to change the filename, but I get a
MalformedStreamException each time I try [1].
Side note: I think spaces are allowed in filenames in unix file
systems. Just quoted or escaped. (Regardless, your point is still
taken.)
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]