I am having trouble opening files using java.awt.FileDialog
without symbolic links being automatically resolved. E.g. given
/my/folder/with/links
/my/folder/with/links/foo_link
And
/my/folder/with/originals
/my/folder/with/originals/foo
And there is a symbolic link from foo
to foo_link
. Now if I navigate to /my/folder/with/links/
and select foo_link
to open, then getDirectory
returns /my/folder/with/originals
and getFile
returns foo
. But I really need to have a handle on the actually selected folder. If I need to, I can resolve this stuff myself using getCanonicalFile
...
This appears on OS X, so I don't know if this is a platform specific problem. I would like to stick to java.awt.FileDialog
instead of javax.swing.JFileChooser
, because the latter is really crappy on OS X.