diff options
Diffstat (limited to 'src/main')
4 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java index 700434532f..fc5a9e81e3 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java @@ -206,7 +206,7 @@ public abstract class FileSystem { /** * Returns value of the given extended attribute name or null if attribute - * does not exist or file system does not support extended attributes. + * does not exist or file system does not support extended attributes. Follows symlinks. * <p>Default implementation assumes that file system does not support * extended attributes and always returns null. Specific file system * implementations should override this method if they do provide support @@ -219,7 +219,7 @@ public abstract class FileSystem { * system does not support extended attributes at all. * @throws IOException if the call failed for any other reason. */ - protected byte[] getxattr(Path path, String name, boolean followSymlinks) throws IOException { + protected byte[] getxattr(Path path, String name) throws IOException { return null; } diff --git a/src/main/java/com/google/devtools/build/lib/vfs/Path.java b/src/main/java/com/google/devtools/build/lib/vfs/Path.java index 32953b8c01..38a29ac5d3 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/Path.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/Path.java @@ -898,7 +898,7 @@ public class Path implements Comparable<Path>, Serializable { * file system does not support extended attributes. Follows symlinks. */ public byte[] getxattr(String name) throws IOException { - return fileSystem.getxattr(this, name, true); + return fileSystem.getxattr(this, name); } /** diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java index d2d9c00096..96fc6cf680 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java @@ -368,9 +368,9 @@ public class UnionFileSystem extends FileSystem { } @Override - protected byte[] getxattr(Path path, String name, boolean followSymlinks) throws IOException { + protected byte[] getxattr(Path path, String name) throws IOException { FileSystem delegate = getDelegate(path); - return delegate.getxattr(adjustPath(path, delegate), name, followSymlinks); + return delegate.getxattr(adjustPath(path, delegate), name); } @Override diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java index 9a80e751b3..2a86b22f36 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/UnixFileSystem.java @@ -391,12 +391,11 @@ public class UnixFileSystem extends AbstractFileSystem { } @Override - protected byte[] getxattr(Path path, String name, boolean followSymlinks) throws IOException { + protected byte[] getxattr(Path path, String name) throws IOException { String pathName = path.toString(); long startTime = Profiler.nanoTimeMaybe(); try { - return followSymlinks - ? FilesystemUtils.getxattr(pathName, name) : FilesystemUtils.lgetxattr(pathName, name); + return FilesystemUtils.getxattr(pathName, name); } catch (UnsupportedOperationException e) { // getxattr() syscall is not supported by the underlying filesystem (it returned ENOTSUP). // Per method contract, treat this as ENODATA. |