mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 06:01:54 +00:00
dump-repo-objs: filename layout improvements
This commit is contained in:
parent
8738e85967
commit
24812b0317
2 changed files with 2 additions and 2 deletions
|
@ -1943,7 +1943,7 @@ def decrypt_dump(i, id, cdata, tag=None, segment=None, offset=None):
|
|||
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)
|
||||
|
|
|
@ -2335,7 +2335,7 @@ def test_debug_dump_repo_objs(self):
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue