mirror of
https://github.com/tstack/lnav.git
synced 2024-09-20 01:08:13 +03:00
[file-collection] restore progress after move nulls out pointer
This commit is contained in:
parent
1dade3d66e
commit
24a56042d0
@ -300,6 +300,8 @@ file_collection::watch_logfile(const std::string& filename,
|
||||
return lnav::futures::make_ready_future(std::move(retval));
|
||||
}
|
||||
|
||||
require(this->fc_progress.get() != nullptr);
|
||||
|
||||
auto func = [filename,
|
||||
st,
|
||||
loo2 = std::move(loo),
|
||||
|
@ -404,7 +404,7 @@ files_overlay_source::list_value_for_overlay(const listview_curses& lv,
|
||||
constexpr size_t PROG_SIZE = sizeof(PROG) - 1;
|
||||
|
||||
auto& fc = lnav_data.ld_active_files;
|
||||
auto& fc_prog = fc.fc_progress;
|
||||
auto fc_prog = fc.fc_progress;
|
||||
safe::WriteAccess<safe_scan_progress> sp(*fc_prog);
|
||||
|
||||
if (!sp->sp_extractions.empty()) {
|
||||
|
@ -1328,6 +1328,7 @@ looper()
|
||||
{
|
||||
active_copy.clear();
|
||||
active_copy.merge(lnav_data.ld_active_files);
|
||||
active_copy.fc_progress = lnav_data.ld_active_files.fc_progress;
|
||||
rescan_future = std::async(std::launch::async,
|
||||
&file_collection::rescan_files,
|
||||
std::move(active_copy),
|
||||
|
Loading…
Reference in New Issue
Block a user