From 0cc09fb7616df2bc8ff35e8d32a276afe354435c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Fri, 7 Dec 2012 11:17:23 +0100 Subject: [PATCH] mknod needs st_rdev, not st_dev. --- darc/archive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/darc/archive.py b/darc/archive.py index 73be641d3..a5237bd5d 100644 --- a/darc/archive.py +++ b/darc/archive.py @@ -272,7 +272,7 @@ class Archive(object): 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 @@ class Archive(object): 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)