On Tue, 11 Oct 2022 06:42:37 GMT, Abhishek Kumar <[email protected]> wrote:
>> When a user selects ../ from directory list in GTK FileChooser continuosly,
>> it leads to '../../../.....' in combobox and selection textarea even though
>> it the current directory is at root level.
>>
>> Fix for the issue is to remove "../" entry from JFileChooser directory list
>> in GTK LAF if current directory is root.
>>
>> Test case has been added and checked in CI pipeline. Link is attached in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Review comment fix and test case changed to manual
src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
line 997:
> 995: File crntDir = getFileChooser().getCurrentDirectory();
> 996: if (crntDir != null && crntDir.getParentFile() == null &&
> 997: files.contains(new File("/.."))) {
Is it not possible to use "FileSystemView.isFileSystemRoot(File)" for this?
-------------
PR: https://git.openjdk.org/jdk/pull/10390