Repository: jclouds Updated Branches: refs/heads/2.1.x f8e722214 -> ba9d02f7f
Add error handling for missing xattr Previously this prevented listing inside a directory when using file systems like HFS and NFS. References gaul/s3proxy#279. Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/ba9d02f7 Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/ba9d02f7 Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/ba9d02f7 Branch: refs/heads/2.1.x Commit: ba9d02f7f95807a493ec5d81fe7e36acec15ea02 Parents: f8e7222 Author: Andrew Gaul <[email protected]> Authored: Fri Jan 4 11:40:10 2019 -0800 Committer: Andrew Gaul <[email protected]> Committed: Fri Jan 4 11:42:09 2019 -0800 ---------------------------------------------------------------------- .../strategy/internal/FilesystemStorageStrategyImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/ba9d02f7/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java ---------------------------------------------------------------------- diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index 0442c71..f1c49c5 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -709,7 +709,11 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { if (!exists && getDirectoryBlobSuffix(tokens[tokens.length - 1]) != null && file.isDirectory()) { UserDefinedFileAttributeView view = getUserDefinedFileAttributeView(file.toPath()); - exists = view != null && view.list().contains(XATTR_CONTENT_MD5); + try { + exists = view != null && view.list().contains(XATTR_CONTENT_MD5); + } catch (IOException ioe) { + logger.debug("xattrs not supported on %s", file.toPath()); + } } return exists; }
