Skip to content

Fix: BitLocker locked drive not shown#18468

Open
muko wants to merge 1 commit into
files-community:mainfrom
muko:fix/locked-bitlocker-drive-not-shown
Open

Fix: BitLocker locked drive not shown#18468
muko wants to merge 1 commit into
files-community:mainfrom
muko:fix/locked-bitlocker-drive-not-shown

Conversation

@muko
Copy link
Copy Markdown
Contributor

@muko muko commented May 8, 2026

Resolved / Related Issues

This PR fixes an issue where locked BitLocker drives were not shown.

Note: This PR updates only WindowsStorageDeviceWatcher; however, commit 6674a8f also changes StorageDeviceServices.

Steps used to test these changes

  • a locked BitLocker drive is displayed
  • an SD card slot without media is not displayed

@muko muko changed the title Fix: BitLocker locked drive not showen Fix: BitLocker locked drive not shown May 9, 2026
@muko muko force-pushed the fix/locked-bitlocker-drive-not-shown branch from 8a44aaf to 0e96df1 Compare May 9, 2026 09:34
@yair100 yair100 requested review from d2dyno1 May 11, 2026 16:17
@yair100 yair100 added ready for review Pull requests that are ready for review labels May 11, 2026
{
var driveAdded = new DriveInfo(e.DeviceId);
if (!driveAdded.IsReady)
if (!driveAdded.IsReady && !IsUnauthorizedDrive(driveAdded))
Copy link
Copy Markdown
Member

@d2dyno1 d2dyno1 May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be "or" condition (||).
If the drive is not ready, IsUnauthorizedDrive will still be called, causing an exception on an unready drive

// Check if this drive is associated with a drive letter
var driveAdded = new DriveInfo(root.Path);
if (!driveAdded.IsReady)
if (!driveAdded.IsReady && !IsUnauthorizedDrive(driveAdded))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants