Really handle hardlinks in the rpmunpack python example, doh
This commit is contained in:
parent
9e3bb9fd43
commit
6f5d9b4677
|
@ -24,8 +24,9 @@ def unpack(h, fd):
|
|||
# handle hardlinks
|
||||
if f.nlink > 1:
|
||||
for l in f.links:
|
||||
if l.inode != f.inode:
|
||||
os.link(fn, l.name)
|
||||
if l.name != f.name:
|
||||
ln = './%s' % l.name
|
||||
os.link(fn, ln)
|
||||
elif stat.S_ISDIR(f.mode):
|
||||
os.mkdir(fn)
|
||||
elif stat.S_ISLNK(f.mode):
|
||||
|
|
Loading…
Reference in New Issue