mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 05:57:42 +00:00
nixos/lib: Handle null device
correctly
This commit is contained in:
parent
ea34fe21e1
commit
7a0c1728ac
@ -27,7 +27,7 @@ rec {
|
||||
# *not* a parent of b.device. If we add a slash at the end of each string,
|
||||
# though, this is not a problem: "/aaa/" is not a prefix of "/aaaa/".
|
||||
normalisePath = path: "${path}${optionalString (!(hasSuffix "/" path)) "/"}";
|
||||
normalise = mount: mount // { device = normalisePath mount.device;
|
||||
normalise = mount: mount // { device = normalisePath (toString mount.device);
|
||||
mountPoint = normalisePath mount.mountPoint;
|
||||
depends = map normalisePath mount.depends;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user