mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 01:06:50 +00:00
mknod needs st_rdev, not st_dev.
This commit is contained in:
parent
491c560c3e
commit
0cc09fb761
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue