--- a/XAttrs.cpp Tue Dec 26 12:40:20 2023 +0100
+++ b/XAttrs.cpp Tue Dec 26 15:41:07 2023 +0100
@@ -138,13 +138,15 @@
if (reload || !impl->loaded) {
impl->attributes.clear();
std::vector<std::string> names = xattrList(impl->fileName);
- // FIXME: remove nameSpace
+ const std::string prefix = impl->nameSpace + ".";
for (const std::string& name : names) {
- Attribute a;
- a.impl->xattrs = impl;
- a.impl->name = name;
- a.impl->value = xattrGet(impl->fileName, name, &a.impl->exists);
- impl->attributes.push_back(a);
+ if (name.starts_with(prefix)) {
+ Attribute a;
+ a.impl->xattrs = impl;
+ a.impl->name = name.substr(prefix.size());
+ a.impl->value = xattrGet(impl->fileName, name, &a.impl->exists);
+ impl->attributes.push_back(a);
+ }
}
impl->loaded = true;
}