From 3bbed1bc46e0345eb4bfef9e720e101546be0a6c Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 13 Dec 2025 16:21:49 +0000 Subject: [PATCH] fstab: deref fuseblk to real fs --- copyparty/fsutil.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/copyparty/fsutil.py b/copyparty/fsutil.py index d473c016..2151c8c8 100644 --- a/copyparty/fsutil.py +++ b/copyparty/fsutil.py @@ -127,6 +127,24 @@ class Fstab(object): self.log("mtab has changed; reevaluating support for sparse files") + try: + fuses = [mp for mp, fs in dtab.items() if fs == "fuseblk"] + if not fuses or MACOS: + raise Exception() + try: + so, _ = chkcmd(["lsblk", "-nrfo", "FSTYPE,MOUNTPOINT"]) # centos6 + except: + so, _ = chkcmd(["lsblk", "-nrfo", "FSTYPE,MOUNTPOINTS"]) # future + for ln in so.split("\n"): + zsl = ln.split(" ", 1) + if len(zsl) != 2: + continue + fs, mp = zsl + if mp in fuses: + dtab[mp] = fs + except: + pass + tab1 = list(dtab.items()) tab1.sort(key=lambda x: (len(x[0]), x[0])) path1, fs1 = tab1[0]