From 15a0416eed6d51358c2bb1024362419545d6749a Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Wed, 25 Jun 2014 14:40:07 -0400 Subject: [PATCH] don't flush if it's the .mergerfs pseudo file. closes #18 --- src/flush.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/flush.cpp b/src/flush.cpp index 6d4fd705..01455cc0 100644 --- a/src/flush.cpp +++ b/src/flush.cpp @@ -27,6 +27,7 @@ #include #include +#include "config.hpp" #include "fileinfo.hpp" static @@ -49,9 +50,14 @@ namespace mergerfs namespace flush { int - flush(const char *path, + flush(const char *fusepath, struct fuse_file_info *fi) { + const config::Config &config = config::get(); + + if(fusepath == config.controlfile) + return 0; + return _flush(((FileInfo*)fi->fh)->fd); } }