On Thu, 25 May 2023 13:42:29 GMT, Alexey Ivanov <[email protected]> wrote:
>>> Since `FileSystemView.isFileSystem` is used in many places for particular >>> Look and Feel, there might be chances of regression. So how about checking >>> for shell folder first and if yes then can combine the >>> `shell.isFileSystem()` with `isSymbolicLink()` in BasicFileChooser >>> class.......? If its not a shell folder then directly we can check for >>> `isSymbolicLink()`. >> >> I guess what I proposed is riskier but _it's better_. It resolves the >> problem why junctions and symbolic links aren't accepted. It will also >> handle junctions correctly, now, as I showed above, selecting a junction >> results in the selected file being set to `null` just like it was for >> symbolic links before your first fix. >> >> Another thing to try is to modify `Win32ShellFolder2.isLink` so that it >> returns `true` only for Windows shortcuts that is for `.lnk` files. In this >> case, the behaviour will be the same as it was on previous versions of >> Windows where neither junctions nor symbolic links were considered a link. > > As for other Look-and-Feels, `isFileSystem` is used for the same purpose that > it's used in the code you're modifying: if a selected object in the list is a > file system object (a directory), the text field to the path of the selected > object; otherwise, set the text field to `null`. Ok, then let me work the proposed fix. As per the proposed fix, `FileSystemView.isFileSystem ` has to return if its fileSystem or not......? What about .ink? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13998#discussion_r1205563299
