src/FilesystemCommand.h
branchv_0
changeset 29 6f15f18d2abf
parent 28 9172bd97ae99
child 31 c64e1588f428
--- a/src/FilesystemCommand.h	Mon Nov 11 14:42:13 2019 +0100
+++ b/src/FilesystemCommand.h	Sat Jan 11 00:56:51 2020 +0100
@@ -37,8 +37,7 @@
 #include "AttributeFinder.h"
 #include "FileAttributeFinder.h"
 #include "XattrAttributeFinder.h"
-#include "HashAttributeFinder.h"
-#include "ScriptAttributeFinder.h"
+#include "ExecAttributeFinder.h"
 
 namespace relpipe {
 namespace in {
@@ -52,14 +51,12 @@
 	std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
 
 	FileAttributeFinder fileAttributeFinder;
-	HashAttributeFinder hashAttributeFinder;
-	ScriptAttributeFinder scriptAttributeFinder;
+	ExecAttributeFinder execAttributeFinder;
 	XattrAttributeFinder xattrAttributeFinder;
 
 	std::map<string_t, AttributeFinder*> attributeFinders{
 		{RequestedField::GROUP_FILE, &fileAttributeFinder},
-		{RequestedField::GROUP_HASH, &hashAttributeFinder},
-		{RequestedField::GROUP_SCRIPT, &scriptAttributeFinder},
+		{RequestedField::GROUP_EXEC, &execAttributeFinder},
 		{RequestedField::GROUP_XATTR, &xattrAttributeFinder}};
 
 	void reset(std::stringstream& stream) {
@@ -83,7 +80,7 @@
 		std::vector<AttributeMetadata> attributesMetadata;
 		for (RequestedField field : configuration.fields) {
 			AttributeFinder* finder = attributeFinders[field.group];
-			if (finder) for (AttributeMetadata m : finder->toMetadata(field)) attributesMetadata.push_back(m);
+			if (finder) for (AttributeMetadata m : finder->toMetadata(writer.get(), field)) attributesMetadata.push_back(m);
 			else throw RelpipeWriterException(L"Unsupported field group: " + field.group);
 		}