[EXTERNAL] Re: Bug in Files.isSameFile(Path,Path)
Alan Bateman
Alan.Bateman at oracle.com
Thu Oct 29 14:38:13 UTC 2020
On 29/10/2020 00:13, Nhat Nguyen wrote:
> Hi everyone,
>
> We looked into the issue and found that the values of volSerialNumber, fileIndexHigh, and fileIndexLow
> in the file attributes, which are used to determine if the two files are the same, are all zeroes when used
> with webdav drives. However, this looks like a known issue as cpython seems to suffer from the same
> behaviour as well [1].
>
> We have a suggested fix [2] that falls back to using GetFinalPathByHandle and comparing the two paths
> when the volSerialNumber is zero. We have also reached out to the Windows team to confirm if this is
> the preferred way to detect such cases; we will get back when we have hear back from them.
>
> [1]: https://urldefense.com/v3/__https://github.com/python/cpython/pull/5764*discussion_r169221544__;Iw!!GqivPVa7Brio!MSTuVM_mze8WyS_jCYTUERbKOrDJvE3tN69jgw0YSEV913TEHeuj3XAIgGRWvXtGOA$
> [2]: https://urldefense.com/v3/__https://github.com/nhat-nguyen/jdk/commit/bd8fdc2809ed08e5564fe1eab4a7c1c2f32df84b__;!!GqivPVa7Brio!MSTuVM_mze8WyS_jCYTUERbKOrDJvE3tN69jgw0YSEV913TEHeuj3XAIgGR86r4qEA$
>
>
Thanks for looking into it. Do you know if the serial number = 0 is
documented anywhere?
I have a number of comments on how this workaround should fit in, I'll
reply soon on this.
-Alan.
More information about the nio-dev
mailing list