about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2019-05-10 08:42:23 +0300
committerNikolay Amiantov <ab@fmap.me>2019-06-03 11:55:48 +0300
commitfa2e4bfb61cc5826d36833b12fda312ac1261137 (patch)
tree51b57608c967a0f48e8004cfd8f1d1a1a6f30c24 /nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
parent7ec20f99e65f75b224422b8cc98e3feda9bfb08b (diff)
downloadnixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar.gz
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar.bz2
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar.lz
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar.xz
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.tar.zst
nixlib-fa2e4bfb61cc5826d36833b12fda312ac1261137.zip
nixos/systemd-boot: don't remove directories from EFI dir
This will only result in an error. These directories might be created by, for example, fwupdmgr.
Diffstat (limited to 'nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py')
-rw-r--r--nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
index 940d4c0eb973..ebe37ca10a2d 100644
--- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
+++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
@@ -154,7 +154,7 @@ def remove_old_entries(gens):
         except ValueError:
             pass
     for path in glob.iglob("@efiSysMountPoint@/efi/nixos/*"):
-        if not path in known_paths:
+        if not path in known_paths and not os.path.isdir(path):
             os.unlink(path)
 
 def get_profiles():