- Check if we had any changes in status before sending a notification for a new
inserted media. This fixes ticket #3921. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30774 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ce4db6ae11
commit
1bf034d2f5
@ -1466,9 +1466,15 @@ KDiskDeviceManager::_CheckMediaStatus()
|
||||
continue;
|
||||
|
||||
bool hadMedia = device->HasMedia();
|
||||
bool changedMedia = device->MediaChanged();
|
||||
device->UpdateMediaStatusIfNeeded();
|
||||
|
||||
if (!device->MediaChanged() && (device->HasMedia() || !hadMedia))
|
||||
// Detect it there was any status change since last check.
|
||||
bool updated = (hadMedia != device->HasMedia()) ||
|
||||
(changedMedia != device->MediaChanged());
|
||||
|
||||
if ((!device->MediaChanged() &&
|
||||
(device->HasMedia() || !hadMedia)) || !updated)
|
||||
continue;
|
||||
|
||||
device->MarkBusy(true);
|
||||
|
Loading…
Reference in New Issue
Block a user