diff options
author | Domen Kožar <domen@dev.si> | 2016-09-01 10:14:23 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-09-01 10:14:44 +0200 |
commit | 2a7293fd9dbd30305a0e32e2e98e42fc5329ff40 (patch) | |
tree | db5e44f7c04968df08fbcc0415bf1075a0b59d59 /nixos/modules | |
parent | 5e5b0d039c7052b563a498608cd90e6184603504 (diff) | |
download | nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar.gz nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar.bz2 nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar.lz nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar.xz nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.tar.zst nixlib-2a7293fd9dbd30305a0e32e2e98e42fc5329ff40.zip |
install-grub.pl: fix a double slash prefix bug
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 4110335a9eb8..1015beeec976 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -140,7 +140,10 @@ my $driveid = 1; sub GrubFs { my ($dir) = @_; my $fs = GetFs($dir); - my $path = "/" . substr($dir, length($fs->mount)); + my $path = substr($dir, length($fs->mount)); + if (substr($path, 0, 1) ne "/") { + $path = "/$path"; + } my $search = ""; if ($grubVersion > 1) { |