Skip to content

check_drivesize: fix volume discovery when volume is not mounted to a letter. - #441

Draft
inqrphl wants to merge 2 commits into
mainfrom
check-drivesize-volume-discovery-custom-path-fix
Draft

check_drivesize: fix volume discovery when volume is not mounted to a letter.#441
inqrphl wants to merge 2 commits into
mainfrom
check-drivesize-volume-discovery-custom-path-fix

Conversation

@inqrphl

@inqrphl inqrphl commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

if mount is not mounted to a drive letter, its "name" attribute is set. "drive" attribute is empty. use it instead when checking for prefixes against searched custom path

rename the testPath as volumeTestPath for clarity, it is tested against volumes. it starts off from cleanedPath so no need to clean it again.

additionally, improve some comments

@inqrphl
inqrphl marked this pull request as draft August 5, 2026 10:22

@inqrphl inqrphl left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i will test it on a windows machine using multiple scenarios when I have time, do not merge yet

@inqrphl
inqrphl force-pushed the check-drivesize-volume-discovery-custom-path-fix branch 2 times, most recently from e204696 to 3c6a8f8 Compare August 6, 2026 11:45
@inqrphl

inqrphl commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

seems to be working locally, but want to add #442 alike tests before marking it ready. we had way too many problems with volumes, caused by every small change to check_drivesize

the tests will be added to check_drivesize unit tests, not end to end tests

Ahmet Oeztuerk and others added 2 commits August 6, 2026 18:11
… letter.

if mount is not mounted to a drive letter and to a folder like "C:\mounttest" its "name" attribute is set. "drive" attribute is empty. fill them according to the folder path

organize the attributes nicely in the custom path decivder working on volumes, building up attributes like drive_or_id , drive_or_name , drive_or_name_or_id

add _matching_volume_path attribute, this is used when folder= attrbitue is set and it picks a volume in its parent path as its matching volume.
folders are added with their attributes 'id' and 'drive' set to their custom paths. matching volume path is lost, unless we save it to '_matching_volume_path' attribute
'_matching_volume_path' is then used in the setDeviceInfo call

rename the testPath as volumeTestPath for clarity, it is tested against volumes. it starts off from cleanedPath so no need to clean it again.

additionally, improve some comments
matched volume might have its drive as empty string, if it is a volume mounted to a folder
@inqrphl
inqrphl force-pushed the check-drivesize-volume-discovery-custom-path-fix branch from 862a966 to 793b39c Compare August 6, 2026 16:12
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