[jcifs] Has anybody else seen problems with file names that
start with a dot?
Michael B Allen
mba2000 at ioplex.com
Mon Nov 10 11:43:47 EST 2003
> $ java HttpURL "http://server/apath/" ".#filename.txt"
> http://server/apath/#filename.txt <-----OOPS
> $ java HttpURL "http://server/apath/" "..#filename.txt"
> http://server/#filename.txt <----WORSE
Actually this isn't really a bug in java.net.URL because '#' is being
treated like a separator so '.' and '..' are canonicalized. Unless we URL
encode everything going and URL decode everything coming out (or catch
these specific classes of filenames) I don't think I can fix this
A program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the potential for it to be applied to tasks that are
conceptually similar and, more important, to tasks that have not
yet been conceived.
More information about the jcifs