Defensive drive state (#89)
fixes #79 Reviewed-on: #89 Co-authored-by: localhorst <localhorst@mosad.xyz> Co-committed-by: localhorst <localhorst@mosad.xyz>
This commit is contained in:
@ -542,7 +542,6 @@ void reHDD::startShredAllDrives(list<Drive> *plistDrives)
|
||||
address << (void const *)&(*pTmpDrive);
|
||||
Logger::logThis()->info("Started shred (all) for: " + pTmpDrive->getModelName() + "-" + pTmpDrive->getSerial() + " @" + address.str());
|
||||
#endif
|
||||
pTmpDrive->state = Drive::TaskState::SHRED_ACTIVE;
|
||||
thread(ThreadShred, pTmpDrive).detach();
|
||||
}
|
||||
}
|
||||
@ -694,7 +693,6 @@ void reHDD::handleEnter()
|
||||
if (tmpSelectedDrive->state == Drive::TaskState::SHRED_SELECTED)
|
||||
{
|
||||
Logger::logThis()->info("Started shred/check for: " + tmpSelectedDrive->getModelName() + "-" + tmpSelectedDrive->getSerial());
|
||||
tmpSelectedDrive->state = Drive::TaskState::SHRED_ACTIVE;
|
||||
// task for drive is running --> don't show more task option
|
||||
thread(ThreadShred, tmpSelectedDrive).detach();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user