From c73bcaf87191e8e454d69b00a81354c0eca56b03 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Tue, 3 Mar 2026 13:53:50 +0100 Subject: [PATCH] Fix FUSE channel cleanup and error logging (#311) FUSE fixes tested and verified --- pclsync/pfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pclsync/pfs.c b/pclsync/pfs.c index ef8b352..fa8ce64 100644 --- a/pclsync/pfs.c +++ b/pclsync/pfs.c @@ -3498,6 +3498,7 @@ static void pfs_do_stop(void) { if (mp) { if (stat(mp, &st_before) == 0) { fuse_unmount(mp, psync_fuse_channel); + psync_fuse_channel = NULL; clock_gettime(CLOCK_REALTIME, &ts); // Check if the mountpoint is still accessible @@ -3739,7 +3740,8 @@ static int pfs_do_start() { if (pdbg_unlikely(!psync_fuse_channel)) { pdbg_logf(D_CRITICAL, "CRITICAL ERROR: fuse_mount() failed for mount point %s. " - "The FUSE filesystem cannot be started.", mp); + "The FUSE filesystem cannot be started. errno=%d (%s)", + mp, errno, strerror(errno)); goto err0; } psync_fuse = fuse_new(psync_fuse_channel, &args, &psync_oper,