Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle paths without DriveInfo #4300

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 7, 2025

Problem

On a Linux system with a ZFS root filesystem, trying to use a ZFS filesystem for the download cache or the game folder throws Argumentexceptions in DriveInfo's constructor, which then breaks lots of other things:

image

Cause

DriveInfo is supposed to represent the partition associated with the given path, but Mono can only find it if the device's path starts with a / character in the listing in /etc/mtab. ZFS filesystems instead use devices starting with rpool/, so they're ignored (see discussion in #4251 for investigation with source code excerpts). If the root is also ZFS, then no device is found, and ArgumentException is thrown.

Changes

Now if this exception is thrown, we catch it and give up on trying to figure out that path's free space. This should allow ZFS filesystems to be used, but without the protections afforded by checking the free space before installation.

Fixes #4251.

@HebaruSan HebaruSan added Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Linux Issues specific for Linux Mono Issues specific for Mono labels Feb 7, 2025
@HebaruSan HebaruSan merged commit 70225e9 into KSP-CKAN:master Feb 7, 2025
2 checks passed
@HebaruSan HebaruSan deleted the fix/zfs branch February 7, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Linux Issues specific for Linux Mono Issues specific for Mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid path: The drive name does not exist for ZFS filesystem
1 participant