From d99a275da9a059447eae062bc53b20e925e1a84c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 12 Apr 2020 21:16:27 +0200 Subject: [PATCH] fuse: set f_namemax in statfs result, fixes #2684 setting it to 255 for now (as seen on Linux / ext4), better than the default 0. the attribute is only present since llfuse 1.3.0. --- src/borg/fuse.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index f0933ddbe..429790e43 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -518,6 +518,8 @@ class FuseOperations(llfuse.Operations): stat_.f_files = 0 stat_.f_ffree = 0 stat_.f_favail = 0 + if hasattr(stat_, 'f_namemax'): # since llfuse 1.3.0 + stat_.f_namemax = 255 # == NAME_MAX (depends on archive source OS / FS) return stat_ def get_item(self, inode):