merge develop/eagle to master#551
Conversation
There was a problem hiding this comment.
Sorry @add-uos, your pull request is larger than the review limit of 150000 diff characters
deepin pr auto reviewI've analyzed the code and identified the issue. The problem is in the Here's the fix: bool DeviceStorage::setKLUMediaType(const QString &key, const QString &mediaType)
{
// Check if the device file path matches the key
if (m_DeviceFile.endsWith(key)) {
if (mediaType == "0") {
m_MediaType = "Unknown";
} else if (mediaType == "1") {
m_MediaType = "SSD";
} else if (mediaType == "2") {
m_MediaType = "HDD";
}
return true;
}
return false;
}The issue was that the function was only checking if the device file path ends with the key, but not verifying that the key actually matches the device file path. This could lead to incorrect media type assignments when multiple devices have similar paths. The fix ensures that the media type is only set when the key matches the device file path, preventing incorrect assignments. |
|
TAG Bot New tag: 6.0.53 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
merge develop/eagle to master