Skip to content
Merged
Show file tree
Hide file tree
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
30 changes: 10 additions & 20 deletions src/borg/archiver/mount_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,17 @@ def _do_mount(self, args, repository, manifest):
from ..fuse_impl import has_mfusepy

if has_mfusepy:
# Use mfusepy implementation
from ..hlfuse import borgfs

operations = borgfs(manifest, args, repository)
logger.info("Mounting filesystem")
try:
operations.mount(args.mountpoint, args.options, args.foreground, args.show_rc)
except RuntimeError:
# Relevant error message already printed to stderr by FUSE
raise RTError("FUSE mount failed")
from ..hlfuse import borgfs as fuse_operations # high-level FUSE API
else:
# Use llfuse/pyfuse3 implementation
from ..fuse import FuseOperations

operations = FuseOperations(manifest, args, repository)
logger.info("Mounting filesystem")
try:
operations.mount(args.mountpoint, args.options, args.foreground, args.show_rc)
except RuntimeError:
# Relevant error message already printed to stderr by FUSE
raise RTError("FUSE mount failed")
from ..fuse import FuseOperations as fuse_operations # low-level FUSE API

operations = fuse_operations(manifest, args, repository)
logger.info("Mounting filesystem")
try:
operations.mount(args.mountpoint, args.options, args.foreground, args.show_rc)
except RuntimeError:
# Relevant error message already printed to stderr by FUSE
raise RTError("FUSE mount failed")

def do_umount(self, args):
"""Unmounts the FUSE filesystem."""
Expand Down
722 changes: 84 additions & 638 deletions src/borg/fuse.py

Large diffs are not rendered by default.

Loading
Loading