fix: only remove orphaned metadata on first opening
This avoids deleting the metadata while one is updating their mods. Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
c375e7b4df
commit
2f5e55bea0
4 changed files with 18 additions and 10 deletions
|
@ -63,6 +63,9 @@ void ModFolderModel::startWatching()
|
|||
if(is_watching)
|
||||
return;
|
||||
|
||||
// Remove orphaned metadata next time
|
||||
m_first_folder_load = true;
|
||||
|
||||
update();
|
||||
|
||||
// Watch the mods folder
|
||||
|
@ -113,7 +116,8 @@ bool ModFolderModel::update()
|
|||
}
|
||||
|
||||
auto index_dir = indexDir();
|
||||
auto task = new ModFolderLoadTask(dir(), index_dir, m_is_indexed);
|
||||
auto task = new ModFolderLoadTask(dir(), index_dir, m_is_indexed, m_first_folder_load);
|
||||
m_first_folder_load = false;
|
||||
|
||||
m_update = task->result();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue