Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/borg/archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2406,8 +2406,8 @@ def do_debug_dump_hints(self, args, repository):
def do_debug_convert_profile(self, args):
"""convert Borg profile to Python profile"""
import marshal
with args.output, args.input:
marshal.dump(msgpack.unpack(args.input, use_list=False, raw=False), args.output)
with open(args.input, 'rb') as input_file, open(args.output, 'wb') as output_file:
marshal.dump(msgpack.unpack(input_file, use_list=False, raw=False), output_file)

@with_repository(lock=False, manifest=False)
def do_break_lock(self, args, repository):
Expand Down Expand Up @@ -3227,8 +3227,8 @@ def define_borg_mount(parser):
archives and the directory structure below these will be loaded on-demand from
the repository when entering these directories, so expect some delay.

Care should be taken, as Borg backs up symlinks as-is. When an archive
or repository is mounted, it is possible to “jump” outside the mount point
Care should be taken, as Borg backs up symlinks as-is. When an archive
or repository is mounted, it is possible to “jump” outside the mount point
by following a symlink. If this happens, files or directories (or versions of them)
that are not part of the archive or repository may appear to be within the mount point.

Expand Down Expand Up @@ -4140,10 +4140,8 @@ def define_borg_mount(parser):
formatter_class=argparse.RawDescriptionHelpFormatter,
help='convert Borg profile to Python profile (debug)')
subparser.set_defaults(func=self.do_debug_convert_profile)
subparser.add_argument('input', metavar='INPUT', type=argparse.FileType('rb'),
help='Borg profile')
subparser.add_argument('output', metavar='OUTPUT', type=argparse.FileType('wb'),
help='Output file')
subparser.add_argument('input', metavar='INPUT', type=str, help='Borg profile')
subparser.add_argument('output', metavar='OUTPUT', type=str, help='Output file')

# borg delete
delete_epilog = process_epilog("""
Expand Down
Loading