Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v6]

2021-07-31 Thread Alan Bateman
On Fri, 30 Jul 2021 17:22:59 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v6]

2021-07-30 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v5]

2021-07-30 Thread Naoto Sato
On Fri, 30 Jul 2021 15:43:52 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-30 Thread Lance Andersen
On Fri, 30 Jul 2021 11:24:37 GMT, Alan Bateman wrote: >> src/jdk.zipfs/share/classes/module-info.java line 49: >> >>> 47: * >>> 48: * @implNote The Zip File System will throw a ZipException when opening >>> an >>> 49: * existing Zip file that contains Zip entries with "." or ".." in its

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v5]

2021-07-30 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-30 Thread Alan Bateman
On Fri, 30 Jul 2021 01:43:56 GMT, Jaikiran Pai wrote: >> Lance Andersen has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six additional >>

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-29 Thread Jaikiran Pai
On Thu, 29 Jul 2021 18:21:07 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-29 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-29 Thread Naoto Sato
On Thu, 29 Jul 2021 18:21:07 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-29 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Alan Bateman
On Mon, 26 Jul 2021 10:16:47 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Lance Andersen
On Mon, 26 Jul 2021 09:52:09 GMT, Jaikiran Pai wrote: > This change looks fine to me. I was unsure how the writing/creating entries > with `.` or `..` with `ZipFileSystem` would behave in context of this change, > so I gave this a try locally with the changes from this PR: > > ``` > try

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Lance Andersen
On Mon, 26 Jul 2021 07:30:12 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add missing Copyright header and address minor comments > >

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Jaikiran Pai
On Sun, 25 Jul 2021 21:56:10 GMT, Lance Andersen wrote: > Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Alan Bateman
On Sun, 25 Jul 2021 21:56:10 GMT, Lance Andersen wrote: > Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as

RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-25 Thread Lance Andersen
Hi, As discussed in the https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html thread, this is the revised patch to address the use of '.' and '..' within Zip FS Zip FS needs to use "." and ".." as links to the current and parent directories and cannot reliably support

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-23 Thread Jaikiran Pai
On Fri, 23 Jul 2021 10:36:51 GMT, Alan Bateman wrote: > I wasn't suggesting there is a patch attached to that issue. Rather I was > just pointing out that JDK-8251329 was being worked on already before this PR > was created. Ok, that makes sense. Thank you for the details. - PR:

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-23 Thread Alan Bateman
On Fri, 23 Jul 2021 08:47:46 GMT, Jaikiran Pai wrote: > This part I didn't understand. Did you mean to refer some other JBS issue? > Because from what I see in https://bugs.openjdk.java.net/browse/JDK-8251329 > there's no patch attached to it (unless of course it's restricted to specific >

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-23 Thread Jaikiran Pai
On Fri, 2 Jul 2021 11:06:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8251329? >> >> As noted in that issue, if a zip filesystem created on top of a jar >> containing a "./" entry is "walked" using the

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-23 Thread Jaikiran Pai
On Fri, 2 Jul 2021 11:06:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8251329? >> >> As noted in that issue, if a zip filesystem created on top of a jar >> containing a "./" entry is "walked" using the

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-23 Thread Alan Bateman
On Fri, 2 Jul 2021 11:08:43 GMT, Lance Andersen wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >>

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Alan Bateman
On 02/07/2021 18:16, Lance Andersen wrote: : That being said, if we want to follow Alan’s suggestion and throw an Exception, I am OK with that as well. Either way, we currently cannot access the file via Zip FS due to the call to ZipPath::getResolvedPath() for all access and the path is only

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Lance Andersen
On Jul 2, 2021, at 12:13 PM, Lance Andersen mailto:lance.ander...@oracle.com>> wrote: On Jul 2, 2021, at 8:08 AM, Jaikiran Pai mailto:jai.forums2...@gmail.com>> wrote: Hello Lance, On 02/07/21 4:42 pm, Lance Andersen wrote: Hi Jaikiran, Consider: try (var os =

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Lance Andersen
On Jul 2, 2021, at 8:08 AM, Jaikiran Pai mailto:jai.forums2...@gmail.com>> wrote: Hello Lance, On 02/07/21 4:42 pm, Lance Andersen wrote: Hi Jaikiran, Consider: try (var os = Files.newOutputStream(ZIPFILE); ZipOutputStream zos = new ZipOutputStream(os)) {

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Alan Bateman
On 02/07/2021 13:08, Jaikiran Pai wrote: Thank you for noticing this issue in my change and bringing this up. I have a question around this use case. Please consider a small variation to your example as below: try (var os = Files.newOutputStream(ZIPFILE); ZipOutputStream zos =

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Jaikiran Pai
Hello Lance, On 02/07/21 4:42 pm, Lance Andersen wrote: Hi Jaikiran, Consider: try (var os = Files.newOutputStream(ZIPFILE); ZipOutputStream zos = new ZipOutputStream(os)) { zos.putNextEntry(new ZipEntry("../Hello.txt")); zos.write("Hello

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Lance Andersen
On Fri, 2 Jul 2021 11:06:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8251329? >> >> As noted in that issue, if a zip filesystem created on top of a jar >> containing a "./" entry is "walked" using the

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v4]

2021-07-02 Thread Jaikiran Pai
> Can I please get a review of this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8251329? > > As noted in that issue, if a zip filesystem created on top of a jar > containing a "./" entry is "walked" using the `Files.walkFileTree`, it leads > to a infinite never ending iteration

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-02 Thread Jaikiran Pai
On Fri, 2 Jul 2021 10:25:29 GMT, Jaikiran Pai wrote: >> Can I please get a review of this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8251329? >> >> As noted in that issue, if a zip filesystem created on top of a jar >> containing a "./" entry is "walked" using the

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v3]

2021-07-02 Thread Jaikiran Pai
> Can I please get a review of this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8251329? > > As noted in that issue, if a zip filesystem created on top of a jar > containing a "./" entry is "walked" using the `Files.walkFileTree`, it leads > to a infinite never ending iteration

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-02 Thread Alan Bateman
On Thu, 1 Jul 2021 13:25:32 GMT, Jaikiran Pai wrote: >> Can I please get a review of this proposed fix for >> https://bugs.openjdk.java.net/browse/JDK-8251329? >> >> As noted in that issue, if a zip filesystem created on top of a jar >> containing a "./" entry is "walked" using the

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-01 Thread Jaikiran Pai
On Thu, 1 Jul 2021 13:05:26 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> implement review suggestion - move isSelfOrParent to ZipPath class > >

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-01 Thread Jaikiran Pai
> Can I please get a review of this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8251329? > > As noted in that issue, if a zip filesystem created on top of a jar > containing a "./" entry is "walked" using the `Files.walkFileTree`, it leads > to a infinite never ending iteration

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-01 Thread Alan Bateman
On Sun, 27 Jun 2021 13:13:42 GMT, Jaikiran Pai wrote: > Can I please get a review of this proposed fix for > https://bugs.openjdk.java.net/browse/JDK-8251329? > > As noted in that issue, if a zip filesystem created on top of a jar > containing a "./" entry is "walked" using the

RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-06-27 Thread Jaikiran Pai
Can I please get a review of this proposed fix for https://bugs.openjdk.java.net/browse/JDK-8251329? As noted in that issue, if a zip filesystem created on top of a jar containing a "./" entry is "walked" using the `Files.walkFileTree`, it leads to a infinite never ending iteration (which