--- 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 <relpipe/writer/RelationalWriter.h>
#include "RequestedField.h"
+#include "AttributeFinder.h"
namespace relpipe {
namespace in {
@@ -37,7 +38,6 @@
private:
std::wstring_convert<codecvt_utf8<wchar_t>> 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) {