File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,8 +52,11 @@ FileData &FileData::operator=(const FileData &rhs)
5252 // flags = rhs.flags;
5353
5454 refreshed = rhs.refreshed .load ();
55- // if (refreshed == FileData::RefreshType::InProcess)
56- // refreshed = FileData::RefreshType::Unrefreshed;
55+
56+ // if we copy data during refresh() we get bad state
57+ // FIXME: later we must delete file data
58+ if (refreshed == FileData::RefreshType::InProcess)
59+ refreshed = FileData::RefreshType::Unrefreshed;
5760
5861 return *this ;
5962}
@@ -93,14 +96,6 @@ void FileData::refresh(const path &file)
9396 if (!refreshed.compare_exchange_strong (r, FileData::RefreshType::InProcess))
9497 return ;
9598
96- // extra protection
97- // some files throw before the last line :(
98- /* SCOPE_EXIT
99- {
100- if (refreshed == FileData::RefreshType::InProcess)
101- refreshed = FileData::RefreshType::Unrefreshed;
102- };*/
103-
10499 bool changed = false ;
105100 auto s = fs::status (file);
106101 if (s.type () != fs::file_type::regular)
You can’t perform that action at this time.
0 commit comments