diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 470862244..9dd8bfbfc 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1943,7 +1943,7 @@ class Archiver: segment_str = '_' + str(segment) if segment is not None else '' offset_str = '_' + str(offset) if offset is not None else '' id_str = '_' + bin_to_hex(id) if id is not None else '' - filename = '%06d%s%s%s%s.obj' % (i, tag_str, segment_str, offset_str, id_str) + filename = '%08d%s%s%s%s.obj' % (i, segment_str, offset_str, tag_str, id_str) print('Dumping', filename) with open(filename, 'wb') as fd: fd.write(data) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index af203d545..a165866ca 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -2335,7 +2335,7 @@ class ArchiverTestCase(ArchiverTestCaseBase): with changedir('output'): output = self.cmd('debug', 'dump-repo-objs', self.repository_location) output_dir = sorted(os.listdir('output')) - assert len(output_dir) > 0 and output_dir[0].startswith('000000_') + assert len(output_dir) > 0 and output_dir[0].startswith('00000000_') assert 'Done.' in output def test_debug_put_get_delete_obj(self):