1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-24 16:55:36 +00:00

mknod needs st_rdev, not st_dev.

This commit is contained in:
Jonas Borgström 2012-12-07 11:17:23 +01:00
parent 491c560c3e
commit 0cc09fb761

View file

@ -272,7 +272,7 @@ def extract_item(self, item, dest=None, restore_attrs=True, peek=None):
os.symlink(source, path)
self.restore_attrs(path, item, symlink=True)
elif stat.S_ISCHR(mode) or stat.S_ISBLK(mode):
os.mknod(path, item['mode'], item['dev'])
os.mknod(path, item['mode'], item['rdev'])
self.restore_attrs(path, item)
else:
raise Exception('Unknown archive item type %r' % item['mode'])
@ -365,7 +365,7 @@ def process_item(self, path, st):
self.add_item(item)
def process_dev(self, path, st):
item = {'path': path.lstrip('/\\:'), 'dev': st.st_dev}
item = {'path': path.lstrip('/\\:'), 'rdev': st.st_rdev}
item.update(self.stat_attrs(st, path))
self.add_item(item)