This commit is contained in:
parent
13f6c10e6e
commit
0a70469cd0
@ -60,6 +60,7 @@ private:
|
|||||||
std::size_t ring_begin_{};
|
std::size_t ring_begin_{};
|
||||||
std::size_t ring_end_{};
|
std::size_t ring_end_{};
|
||||||
std::size_t ring_pos_{};
|
std::size_t ring_pos_{};
|
||||||
|
std::string source_path_;
|
||||||
stop_type stop_requested_{false};
|
stop_type stop_requested_{false};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -66,9 +66,9 @@ ring_buffer_open_file::ring_buffer_open_file(std::string buffer_directory,
|
|||||||
buffer_directory, utils::get_last_error_code()));
|
buffer_directory, utils::get_last_error_code()));
|
||||||
}
|
}
|
||||||
|
|
||||||
fsi_.source_path =
|
source_path_ =
|
||||||
utils::path::combine(buffer_directory, {utils::create_uuid_string()});
|
utils::path::combine(buffer_directory, {utils::create_uuid_string()});
|
||||||
nf_ = utils::file::file::open_or_create_file(fsi_.source_path);
|
nf_ = utils::file::file::open_or_create_file(source_path_);
|
||||||
if (not *nf_) {
|
if (not *nf_) {
|
||||||
throw std::runtime_error(fmt::format("failed to create buffer file|err|{}",
|
throw std::runtime_error(fmt::format("failed to create buffer file|err|{}",
|
||||||
utils::get_last_error_code()));
|
utils::get_last_error_code()));
|
||||||
@ -87,9 +87,9 @@ ring_buffer_open_file::~ring_buffer_open_file() {
|
|||||||
close();
|
close();
|
||||||
|
|
||||||
nf_->close();
|
nf_->close();
|
||||||
if (not utils::file::file(fsi_.source_path).remove()) {
|
if (not utils::file::file(source_path_).remove()) {
|
||||||
utils::error::raise_api_path_error(
|
utils::error::raise_api_path_error(
|
||||||
function_name, fsi_.api_path, fsi_.source_path,
|
function_name, fsi_.api_path, source_path_,
|
||||||
utils::get_last_error_code(), "failed to delete file");
|
utils::get_last_error_code(), "failed to delete file");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user