From 5ebc35388910750498f5c364cd73f55f318548e5 Mon Sep 17 00:00:00 2001 From: Peter Hatina Date: Tue, 2 Oct 2012 11:53:53 +0200 Subject: [PATCH] fix flush operation --- src/simple-mtpfs-fuse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simple-mtpfs-fuse.cpp b/src/simple-mtpfs-fuse.cpp index 844ca76..f9b4d9a 100644 --- a/src/simple-mtpfs-fuse.cpp +++ b/src/simple-mtpfs-fuse.cpp @@ -559,7 +559,7 @@ int SMTPFileSystem::flush(const char *path, struct fuse_file_info *file_info) int SMTPFileSystem::fsync(const char *path, int datasync, struct fuse_file_info *fi) { - return 0; + return datasync ? ::fdatasync(fi->fh) : ::fsync(fi->fh); } int SMTPFileSystem::opendir(const char *path, struct fuse_file_info *file_info)