mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8262957: (fs) Fail fast in UnixFileStore.isExtendedAttributesEnabled
Reviewed-by: alanb
This commit is contained in:
parent
e2106d5af6
commit
27dd88bf9e
3 changed files with 21 additions and 2 deletions
|
@ -179,6 +179,11 @@ abstract class UnixFileStore
|
|||
* @return <code>true</code> if enabled, <code>false</code> if disabled or unable to determine
|
||||
*/
|
||||
protected boolean isExtendedAttributesEnabled(UnixPath path) {
|
||||
if (!UnixNativeDispatcher.xattrSupported()) {
|
||||
// avoid I/O if native code doesn't support xattr
|
||||
return false;
|
||||
}
|
||||
|
||||
int fd = -1;
|
||||
try {
|
||||
fd = path.openForAttributeAccess(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue