Skip to content

Commit

Permalink
fix: remove option negated by exception on /
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Feb 4, 2025
1 parent cdba2f5 commit 023bb61
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/systemd/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1387,10 +1387,15 @@ pub(crate) fn build_options(
{
// systemd follows symlinks, so won't bind mount the symlink,
// add exception for parent instead
action_path
let parent = action_path
.parent()
.map(Path::to_path_buf)
.unwrap_or(action_path)
.unwrap_or(action_path);
if parent == Path::new("/") {
// An exception for / makes the option useless
return None;
}
parent
} else {
action_path
};
Expand Down

0 comments on commit 023bb61

Please sign in to comment.