Skip to content

check_drivesize: improve detection of drives out of the drive argument#410

Open
inqrphl wants to merge 2 commits into
mainfrom
check-drivesize-windows-improve-drive-detection-in-custom-paths
Open

check_drivesize: improve detection of drives out of the drive argument#410
inqrphl wants to merge 2 commits into
mainfrom
check-drivesize-windows-improve-drive-detection-in-custom-paths

Conversation

@inqrphl

@inqrphl inqrphl commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Detect and work with lowercase/uppercase , with or without semicolon, with or without slashes combinations of drive:

c
c:
c:
c:/
C
C:
C:
C:/

The previous version did not realize when C:\ was directly a drive, and tried to open it and match it to an existing drive.

This worked if it was a normal drive, but failed if it was a network mounted drive, the commit realizes that its a drive and directly uses stats provided by gopsutil. Otherwise it would try opening a handle to the drive root and fail, saying it was not mounted.

Add tests that check both the status line and perfdata labels using regex on all 8 combinations.

@sni check if the perfdata labels in tests look good.

inqrphl and others added 2 commits July 14, 2026 14:11
…t that user can type

add tests that check both the status line and perdata labels using regex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant