mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:18:50 +08:00
Remove io_file_t::is_dev_null
This is no longer used.
This commit is contained in:
parent
97dd5ece26
commit
2e7cbaeaba
|
@ -29,8 +29,8 @@
|
|||
|
||||
io_data_t::~io_data_t() = default;
|
||||
|
||||
io_file_t::io_file_t(int f, autoclose_fd_t file, const wcstring &path)
|
||||
: io_data_t(io_mode_t::file, f), file_fd_(std::move(file)), is_dev_null_(path == L"/dev/null") {
|
||||
io_file_t::io_file_t(int f, autoclose_fd_t file)
|
||||
: io_data_t(io_mode_t::file, f), file_fd_(std::move(file)) {
|
||||
assert(file_fd_.valid() && "File is not valid");
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ bool io_chain_t::append_from_specs(const redirection_spec_list_t &specs, const w
|
|||
}
|
||||
return false;
|
||||
}
|
||||
this->push_back(std::make_shared<io_file_t>(spec.fd, std::move(file), path));
|
||||
this->push_back(std::make_shared<io_file_t>(spec.fd, std::move(file)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
7
src/io.h
7
src/io.h
|
@ -212,20 +212,15 @@ class io_file_t : public io_data_t {
|
|||
public:
|
||||
void print() const override;
|
||||
|
||||
io_file_t(int f, autoclose_fd_t file, const wcstring &path);
|
||||
io_file_t(int f, autoclose_fd_t file);
|
||||
|
||||
~io_file_t() override;
|
||||
|
||||
int file_fd() const { return file_fd_.fd(); }
|
||||
|
||||
bool is_dev_null() const { return is_dev_null_; }
|
||||
|
||||
private:
|
||||
// The fd for the file which we are writing to or reading from.
|
||||
autoclose_fd_t file_fd_;
|
||||
|
||||
// Hackish - whether this is /dev/null.
|
||||
const bool is_dev_null_;
|
||||
};
|
||||
|
||||
/// Represents (one end) of a pipe.
|
||||
|
|
Loading…
Reference in New Issue
Block a user