RFR: 8307105: JFileChooser InvalidPathException when selecting some system folders on Windows [v3]
Tejesh R
tr at openjdk.org
Fri May 26 14:42:08 UTC 2023
On Fri, 26 May 2023 14:30:29 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> So now two modifications are required.
>> 1. Modify `isLink` of win32ShellFolder class to return true only if its `.lnk`.
>> 2. `isFileSystem` of FileSystemView to return true only if its valid fileSystem, except `isLink` which actually solves the problem of `isFileSystem ` returning false for links (hard/soft).
>> Am I right?
>
>> So now two modifications are required.
>>
>> 1. Modify `isLink` of win32ShellFolder class to return true only if its `.lnk`.
>
> This should be enough to fix this bug.
>
> This should enable the support for Windows junctions too.
>
>> 2. isFileSystem of FileSystemView to return true only if its valid fileSystem, except isLink which actually solves the problem of isFileSystem returning false for links (hard/soft).
>
> This is automatically resolved by the first change.
>
> Currently, `isFileSystem` returns `false` when both `isLink` and `isDirectory` return `true`, which is the case for symbolic links and junctions.
>
> Then you have to remove the additional conditions that you added in [JDK-8281966](https://bugs.openjdk.org/browse/JDK-8281966).
Yeah, this should do the work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13998#discussion_r1206889350
More information about the client-libs-dev
mailing list