Skip to content

Commit

Permalink
Fix DpCatalog unchecked return value
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Sep 27, 2024
1 parent 63f9955 commit 9c348b3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Svc/DpCatalog/DpCatalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,15 @@ namespace Svc {
U64 pendingDpBytes = 0;

Os::Directory dpDir;
dpDir.open(this->m_directories[dir].toChar(), Os::Directory::OpenMode::READ);
Os::Directory::Status status = dpDir.readDirectory(this->m_fileList, (this->m_numDpSlots - totalFiles), filesRead);
Os::Directory::Status status = dpDir.open(this->m_directories[dir].toChar(), Os::Directory::OpenMode::READ);
if (status != Os::Directory::OP_OK) {
this->log_WARNING_HI_DirectoryOpenError(
this->m_directories[dir],
status
);
return Fw::CmdResponse::EXECUTION_ERROR;
}
status = dpDir.readDirectory(this->m_fileList, (this->m_numDpSlots - totalFiles), filesRead);

if (status != Os::Directory::OP_OK) {
this->log_WARNING_HI_DirectoryOpenError(
Expand Down

0 comments on commit 9c348b3

Please sign in to comment.