mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8073061: (fs) Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable
Reviewed-by: alanb
This commit is contained in:
parent
efb7e85ecf
commit
36ac83904c
5 changed files with 314 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2023, 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
|
||||
|
@ -495,7 +495,7 @@ public abstract class UnixFileSystemProvider
|
|||
if (attrs.length > 0) {
|
||||
UnixFileModeAttribute.toUnixMode(0, attrs); // may throw NPE or UOE
|
||||
throw new UnsupportedOperationException("Initial file attributes" +
|
||||
"not supported when creating symbolic link");
|
||||
" not supported when creating symbolic link");
|
||||
}
|
||||
|
||||
// permission check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue