Import updates to some utilities that were sitting in my personal bin
[utils/utils.git] / stat2
diff --git a/stat2 b/stat2
index e3b9845..896758a 100755 (executable)
--- a/stat2
+++ b/stat2
@@ -13,7 +13,10 @@ while [ "$#" != "0" ] ; do
                getfacl --absolute-names --tabular -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
        fi
        echo "+-- Extended attributes in all namespaces from \`getfattr':"
-       getfattr --absolute-names -h -d -m '' -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
+       # Add -P, otherwise the getfattr command printed xattrs of subdirectories
+       # when passed ~/cc (a symlink).  I think this is a bug.  TODO: report it.
+       # ~ 2010-05-16
+       getfattr --absolute-names -h -d -m '' -P -- "$1" | tail -n +2 | head -n -1 | sed -e "s/^/$indent/"
        echo "'---------------------------------------"
        shift
 done