8342609: jpackage test helper function incorrectly removes a directory instead of its contents only

Reviewed-by: almatvee
This commit is contained in:
Alexey Semenyuk 2024-10-21 22:13:25 +00:00
parent 8276a41958
commit 7133d1b983

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -379,7 +379,7 @@ final public class TKit {
try {
final List<Path> paths;
if (contentsOnly) {
try (var pathStream = Files.walk(root, 0)) {
try (var pathStream = Files.list(root)) {
paths = pathStream.collect(Collectors.toList());
}
} else {