fix: Detect mounts even without /proc#1742
Open
danielzgtg wants to merge 1 commit intoeza-community:mainfrom
Open
fix: Detect mounts even without /proc#1742danielzgtg wants to merge 1 commit intoeza-community:mainfrom
danielzgtg wants to merge 1 commit intoeza-community:mainfrom
Conversation
0f22397 to
e69f32b
Compare
cafkafk
reviewed
Mar 16, 2026
Comment on lines
424
to
427
| #[cfg(not(any(target_os = "linux", target_os = "macos")))] | ||
| pub fn is_mount_point(&self) -> bool { | ||
| false | ||
| } |
Member
There was a problem hiding this comment.
This seems like a pretty hacky introduction of complecity that was previously in the !cfg block
Author
There was a problem hiding this comment.
I brought back the cfg! expression. But the if statement got chopped up by the #[cfg(unix)] needed to hide std::os::unix::fs::MetadataExt for the Windows build.
The traditional way to detect mountpoints is to compare the device IDs containing the directory and its parent. mountpoint(1) uses this if it cannot open `/proc/self/mountinfo`.
e69f32b to
db9744b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The traditional way to detect mountpoints is to compare the device IDs containing the directory and its parent. mountpoint(1) uses this if it cannot open
/proc/self/mountinfo.Before
The underlines are missing when
/procis not properly mounted.After
The underlines are still present without a functioning
/proc.