Skip to content

Commit

Permalink
Check moduledir use using realpath().
Browse files Browse the repository at this point in the history
The moduledir in paths is stored as the real path, so we need to
dereference the found moduledirs as well before matching it.

Fixes: #4
  • Loading branch information
mgorny committed Nov 16, 2011
1 parent a01d34b commit a0feac2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ecleankernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,13 @@ def find_kernels():
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]
try:
setattr(newk, cat, path)
Expand Down

0 comments on commit a0feac2

Please sign in to comment.