8342609: jpackage test helper function incorrectly removes a directory instead of its contents only
Reviewed-by: almatvee
This commit is contained in:
parent
8276a41958
commit
7133d1b983
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -379,7 +379,7 @@ final public class TKit {
|
|||||||
try {
|
try {
|
||||||
final List<Path> paths;
|
final List<Path> paths;
|
||||||
if (contentsOnly) {
|
if (contentsOnly) {
|
||||||
try (var pathStream = Files.walk(root, 0)) {
|
try (var pathStream = Files.list(root)) {
|
||||||
paths = pathStream.collect(Collectors.toList());
|
paths = pathStream.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user