From 2c2337b7c9b87744662c4b08d453bf7128444f43 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Wed, 12 Feb 2020 16:58:20 +0200 Subject: Don't add `-ononempty` on FUSE 3, where it has been removed. FUSE 3 allows nonempty directories by default. --- src/bindfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bindfs.c b/src/bindfs.c index 22b446e..6051f2d 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -2393,8 +2393,9 @@ int main(int argc, char *argv[]) } /* If the mount source and destination directories are the same - then don't require that the directory be empty. */ - if (strcmp(settings.mntsrc, settings.mntdest) == 0) + then don't require that the directory be empty. + FUSE 3 removed support for -ononempty, allowing nonempty directories by default */ + if (strcmp(settings.mntsrc, settings.mntdest) == 0 && fuse_version() < 30) fuse_opt_add_arg(&args, "-ononempty"); /* Open mount source for chrooting in bindfs_init */ -- cgit v1.2.3