Skip to content

Commit

Permalink
fix: [devices] internal devices are not hidden
Browse files Browse the repository at this point in the history
some SCSI controller has some error and cannot be fixed, cause some
inner disks are recognize as removable devices, and cannot be hidden by
'hide system disks' item.
use 'connectionBus' to help recognize if device is system disk.

Log: fix issue about device recognize.

Bug: https://pms.uniontech.com/bug-view-236747.html
  • Loading branch information
itsXuSt authored and deepin-bot[bot] committed Dec 26, 2023
1 parent 8ec21fd commit c0f87e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dfm-base/base/device/devicemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ QStringList DeviceManager::getAllBlockDevID(DeviceQueryOptions opts)
&& !data.value(DeviceProperty::kOptical).toBool())
continue;
if (opts.testFlag(DeviceQueryOption::kSystem)
&& !data.value(DeviceProperty::kHintSystem).toBool())
&& (!data.value(DeviceProperty::kHintSystem).toBool() || data.value(DeviceProperty::kConnectionBus).toString() == "usb"))
continue;
if (opts.testFlag(DeviceQueryOption::kLoop)
&& !data.value(DeviceProperty::kIsLoopDevice).toBool())
Expand Down
2 changes: 1 addition & 1 deletion src/dfm-base/dbusservice/global_server_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ inline constexpr char kMediaCompatibility[] { "MediaCompatibility" };
inline constexpr char kCleartextDevice[] { "CleartextDevice" };
inline constexpr char kDisplayName[] { "DisplayName" };
inline constexpr char kDeviceIcon[] { "DeviceIcon" };
inline constexpr char kConnectionBus[] { "connectBus" };
inline constexpr char kConnectionBus[] { "ConnectionBus" };
inline constexpr char kUDisks2Size[] { "UDisks2Size" };
inline constexpr char kDriveModel[] { "DriveModel" };
inline constexpr char kPreferredDevice[] { "PreferredDevice" };
Expand Down

0 comments on commit c0f87e7

Please sign in to comment.