--- a/src/FilesystemCommand.h Wed Jan 16 18:16:07 2019 +0100
+++ b/src/FilesystemCommand.h Wed Jan 16 18:19:50 2019 +0100
@@ -86,8 +86,7 @@
for (std::stringstream originalName; readNext(input, originalName); reset(originalName)) {
-
- fs::path file(originalName.str());
+ fs::path file(originalName.str().empty() ? "." : originalName.str()); // interpret empty string as current directory (e.g. result of: find -printf '%P\0')
bool exists = false;
try {
@@ -96,7 +95,7 @@
// we probably do not have permissions to given directory → pretend that the file does not exist
}
- for (auto& finder : attributeFinders) finder.second->startFile(file);
+ for (auto& finder : attributeFinders) finder.second->startFile(file, originalName.str());
for (RequestedField field : configuration.fields) {
AttributeFinder* finder = attributeFinders[field.group]; // should not be nullptr, because already checked while writing the relation metadata