fix(filesystem_extractor): only call closefd() if needed

This commit is contained in:
Marcus Holland-Moritz 2024-08-25 14:05:24 +02:00
parent b8459adc05
commit 78c37dc6f5

View File

@ -167,14 +167,14 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
a_ = nullptr;
}
closefd(pipefd_[1]);
if (iot_) {
closefd(pipefd_[1]);
iot_->join();
iot_.reset();
}
closefd(pipefd_[0]);
closefd(pipefd_[0]);
}
}
bool extract(reader::filesystem_v2 const& fs,