else:
prefix = prefix + "-"
postfix = "-%03d.tar%s" % (volume_number + 1, extension)
- try:
- for f in os.listdir(backup_path):
- if f.startswith(prefix) and f.endswith(postfix):
- return f
- except Exception, e:
- import ipdb; ipdb.set_trace()
+ for f in os.listdir(backup_path):
+ if f.startswith(prefix) and f.endswith(postfix):
+ return f
raise Exception("volume not found")
if os.path.exists(member.path):
return
+ # set current volume number in tarobj, otherwise the extraction of the
+ # file might fail when trying to extract a multivolume member
+ index_data['tarobj'].volume_number = index_data['curr_vol_no']
+
# finally, restore the file
index_data['tarobj'].extract(member)