RFR: 8114830: (fs) Files.copy fails due to interference from something else changing the file system [v2]
Alan Bateman
alanb at openjdk.org
Thu Aug 3 22:33:29 UTC 2023
On Thu, 3 Aug 2023 21:30:12 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Throw a `FileSystemException` if attempting to create the target file with `O_EXCL` fails with `EEXIST`.
>
> Brian Burkhalter has updated the pull request incrementally with two additional commits since the last revision:
>
> - 8114830: Convert test to JUnit 5 and expand coverage
> - 8114830: Extend EEXIST check to directories, links, and devices
src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 525:
> 523: if (x.errno() == EEXIST)
> 524: throw new FileSystemException(target.toString(), null,
> 525: "Directory exists");
I don't think "Directory exists", "Link exists", "Special file exists" will work for the exception message because the file that exists may be a regular file.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15141#discussion_r1283780383
More information about the nio-dev
mailing list