1. Michał Górny
  2. eclean-kernel


Michał Górny  committed a0feac2

Check moduledir use using realpath().

The moduledir in paths is stored as the real path, so we need to
dereference the found moduledirs as well before matching it.

Fixes: https://github.com/mgorny/eclean-kernel/issues/4

  • Participants
  • Parent commits a01d34b
  • Branches master

Comments (0)

Files changed (1)

File ecleankernel/kernel.py

View file
 	for cat, g in globs:
 		for m in glob('%s*' % g):
 			kv = m[len(g):]
-			if cat == 'modules' and m in paths:
-				continue
-			elif cat == 'initramfs' and kv.endswith('.img'):
+			if cat == 'initramfs' and kv.endswith('.img'):
 				kv = kv[:-4]
 			path = paths[m]
+			if cat == 'modules' and path in paths:
+				continue
 			newk = kernels[kv]
 				setattr(newk, cat, path)