> FileUtils.copyDirectory() used Files.copy() for all entries including 
> directories. When the destination is an existing directory (like PWD), 
> Files.copy with REPLACE_EXISTING replaces the directory inode, corrupting it. 
> Fixed by using Files.createDirectories() for directory entries and 
> Files.copy() only for files. Added test verifying copyDirectory to PWD works 
> correctly.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Shiv Shah has updated the pull request incrementally with one additional commit 
since the last revision:

  8355320: Use NOFOLLOW_LINKS to match Files.walk symlink behavior

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/31444/files
  - new: https://git.openjdk.org/jdk/pull/31444/files/67ac6ba3..739281f5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=31444&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31444&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/31444.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31444/head:pull/31444

PR: https://git.openjdk.org/jdk/pull/31444

Reply via email to