xattr: detault namespace is: user. v_0 v0.9
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 18 Jan 2019 20:23:48 +0100
branchv_0
changeset 13 b0fabeceb18a
parent 12 0a297eb46ba1
child 14 4e03954642bf
xattr: detault namespace is: user.
src/XattrAttributeFinder.h
--- a/src/XattrAttributeFinder.h	Fri Jan 18 16:47:56 2019 +0100
+++ b/src/XattrAttributeFinder.h	Fri Jan 18 20:23:48 2019 +0100
@@ -55,7 +55,9 @@
 
 	virtual void writeFieldOfExistingFile(RelationalWriter* writer, const RequestedField& field) override {
 		for (string_t alias : field.getAliases()) {
-			if (field.group == RequestedField::GROUP_XATTR) writer->writeAttribute(getXattr(currentFile, field.name));
+			// TODO: support also other namespaces through CLI --option namespace someOtherNS
+			string_t xattrName = L"user." + field.name;
+			if (field.group == RequestedField::GROUP_XATTR) writer->writeAttribute(getXattr(currentFile, xattrName));
 		}
 	}