FIX: not cache printer file list on error

Change-Id: I99843aedbf14d3d1d553ccac9b0bd26403274a82
Jira: none
This commit is contained in:
chunmao.guo 2023-11-21 09:26:10 +08:00 committed by Lane.Wei
parent 5011621ad8
commit f4b062640d

View File

@ -160,8 +160,12 @@ void PrinterFileSystem::ListAllFiles()
}, [this, type = m_file_type](int result, FileList list) { }, [this, type = m_file_type](int result, FileList list) {
if (result != 0) { if (result != 0) {
m_last_error = result; m_last_error = result;
m_status = Status::ListReady; m_status = Status::Failed;
m_file_list.clear();
BuildGroups();
UpdateGroupSelect();
SendChangedEvent(EVT_STATUS_CHANGED, m_status, "", result); SendChangedEvent(EVT_STATUS_CHANGED, m_status, "", result);
SendChangedEvent(EVT_FILE_CHANGED);
return 0; return 0;
} }
if (type != m_file_type) if (type != m_file_type)