diff -r 8d73bff730a7 -r eb1ecb37c6b7 src/FileAttributeFinder.h --- a/src/FileAttributeFinder.h Wed Jan 16 18:16:07 2019 +0100 +++ b/src/FileAttributeFinder.h Wed Jan 16 18:19:50 2019 +0100 @@ -25,6 +25,7 @@ #include #include "RequestedField.h" +#include "AttributeFinder.h" namespace relpipe { namespace in { @@ -37,7 +38,6 @@ private: std::wstring_convert> convertor; // TODO: support also other encodings. - fs::path currentFile; string_t currentOwner; string_t currentGroup; @@ -95,11 +95,8 @@ } } - void startFile(const fs::path& file) override { - currentFile = file; - }; - void endFile() override { + AttributeFinder::endFile(); currentOwner.clear(); currentGroup.clear(); }; @@ -110,7 +107,7 @@ if (field.name == FIELD_NAME) { writer->writeAttribute(currentFile.filename().wstring()); } else if (field.name == FIELD_PATH_ORIGINAL) { - writer->writeAttribute(currentFile.wstring()); + writer->writeAttribute(convertor.from_bytes(currentFileRaw)); } else if (field.name == FIELD_PATH_ABSOLUTE) { writer->writeAttribute(fs::absolute(currentFile).wstring()); } else if (field.name == FIELD_PATH_CANONICAL) {