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,15 +167,15 @@ class filesystem_extractor_ final : public filesystem_extractor::impl {
a_ = nullptr; a_ = nullptr;
} }
if (iot_) {
closefd(pipefd_[1]); closefd(pipefd_[1]);
if (iot_) {
iot_->join(); iot_->join();
iot_.reset(); iot_.reset();
}
closefd(pipefd_[0]); closefd(pipefd_[0]);
} }
}
bool extract(reader::filesystem_v2 const& fs, bool extract(reader::filesystem_v2 const& fs,
filesystem_extractor_options const& opts) override; filesystem_extractor_options const& opts) override;