Skip to content

Handle paths without DriveInfo - #4300

Merged
HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/zfs
Feb 7, 2025
Merged

HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/zfs

Conversation

@HebaruSan

@HebaruSan HebaruSan commented Feb 7, 2025 •

Copy link
Copy Markdown
Member

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
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