From bf80a542fe7aadc41841a4af617539051fcaa1a1 Mon Sep 17 00:00:00 2001 From: liberodark Date: Tue, 21 Jul 2026 10:50:16 +0200 Subject: [PATCH] Add fuse3 support --- mount_linux.go | 9 ++++++++- unmount_linux.go | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mount_linux.go b/mount_linux.go index 08ea5345..5c217402 100644 --- a/mount_linux.go +++ b/mount_linux.go @@ -55,6 +55,13 @@ func isBoringFusermountError(err error) bool { return false } +func fusermountBinary() string { + if path, err := exec.LookPath("fusermount3"); err == nil { + return path + } + return "fusermount" +} + func mount( dir string, conf *mountConfig, @@ -77,7 +84,7 @@ func mount( defer readFile.Close() cmd := exec.Command( - "fusermount", + fusermountBinary(), "-o", conf.getOptions(), "--", dir, diff --git a/unmount_linux.go b/unmount_linux.go index 088f0cfe..2c37fa58 100644 --- a/unmount_linux.go +++ b/unmount_linux.go @@ -7,7 +7,7 @@ import ( ) func unmount(dir string) error { - cmd := exec.Command("fusermount", "-u", dir) + cmd := exec.Command(fusermountBinary(), "-u", dir) output, err := cmd.CombinedOutput() if err != nil { if len(output) > 0 {